sources/oauth: improve debug logging

Signed-off-by: Jens Langhammer <jens.langhammer@beryju.org>
This commit is contained in:
Jens Langhammer 2021-06-02 11:34:18 +02:00
parent 644ff4a90c
commit 35bcd5d174
2 changed files with 2 additions and 0 deletions

View File

@ -45,6 +45,7 @@ class BaseOAuthClient:
profile_url = self.source.profile_url profile_url = self.source.profile_url
try: try:
response = self.do_request("get", profile_url, token=token) response = self.do_request("get", profile_url, token=token)
LOGGER.debug(response.text)
response.raise_for_status() response.raise_for_status()
except RequestException as exc: except RequestException as exc:
LOGGER.warning("Unable to fetch user profile", exc=exc) LOGGER.warning("Unable to fetch user profile", exc=exc)

View File

@ -65,6 +65,7 @@ class OAuth2Client(BaseOAuthClient):
data=args, data=args,
headers=self._default_headers, headers=self._default_headers,
) )
LOGGER.debug(response.text)
response.raise_for_status() response.raise_for_status()
except RequestException as exc: except RequestException as exc:
LOGGER.warning("Unable to fetch access token", exc=exc) LOGGER.warning("Unable to fetch access token", exc=exc)