From 35bcd5d17468188d34451f533f2439e36dadb002 Mon Sep 17 00:00:00 2001 From: Jens Langhammer Date: Wed, 2 Jun 2021 11:34:18 +0200 Subject: [PATCH] sources/oauth: improve debug logging Signed-off-by: Jens Langhammer --- authentik/sources/oauth/clients/base.py | 1 + authentik/sources/oauth/clients/oauth2.py | 1 + 2 files changed, 2 insertions(+) diff --git a/authentik/sources/oauth/clients/base.py b/authentik/sources/oauth/clients/base.py index c62bb285e..d13a02078 100644 --- a/authentik/sources/oauth/clients/base.py +++ b/authentik/sources/oauth/clients/base.py @@ -45,6 +45,7 @@ class BaseOAuthClient: profile_url = self.source.profile_url try: response = self.do_request("get", profile_url, token=token) + LOGGER.debug(response.text) response.raise_for_status() except RequestException as exc: LOGGER.warning("Unable to fetch user profile", exc=exc) diff --git a/authentik/sources/oauth/clients/oauth2.py b/authentik/sources/oauth/clients/oauth2.py index 27443de2b..5cd9751e1 100644 --- a/authentik/sources/oauth/clients/oauth2.py +++ b/authentik/sources/oauth/clients/oauth2.py @@ -65,6 +65,7 @@ class OAuth2Client(BaseOAuthClient): data=args, headers=self._default_headers, ) + LOGGER.debug(response.text) response.raise_for_status() except RequestException as exc: LOGGER.warning("Unable to fetch access token", exc=exc)