Handle None returned by _get_token_info

This commit is contained in:
Jan Kaluza
2017-02-21 09:24:36 +01:00
parent 43ebe6d943
commit 0dbc1f8205

View File

@@ -105,7 +105,7 @@ def get_user(request):
log.exception(error)
raise Unauthorized(error)
if not "active" in data or not data["active"]:
if not data or not "active" in data or not data["active"]:
raise Unauthorized("OIDC token invalid or expired.")
presented_scopes = data['scope'].split(' ')