Commit 2845c951 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Enhance the logging in the auth backend

parent f14eeb5e
......@@ -88,11 +88,11 @@ class OIDCTokenAuthBackend:
return self._get_idp_userinfo_bruteforce(access_token)
except OIDCConfig.DoesNotExist as error:
set_session(request, 'auth_error', error)
raise ValueError
raise ValueError('Unable to retrieve userinfo (bruteforce)')
except HTTPError as error: # raised in idp.get_userinfo
set_session(request, 'auth_error', 'HTTP when retrieving user info: {}'.format(error))
raise ValueError
raise ValueError('Unable to retrieve userinfo')
# authenticate is part of the authentication backend API
def authenticate(self, request):
......@@ -122,7 +122,7 @@ class OIDCTokenAuthBackend:
return user
except (ValueError, SessionError) as error: # ValueError from self._get_idp_userinfo
LOGGER.error('_get_idp_userinfo: %s', error)
return None
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment