diff --git a/module_build_service/auth.py b/module_build_service/auth.py index 1d6ade94..7ba8f8e1 100644 --- a/module_build_service/auth.py +++ b/module_build_service/auth.py @@ -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(' ')