We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e69a713 commit 0b78425Copy full SHA for 0b78425
galaxy_ng/app/auth/auth.py
@@ -47,8 +47,8 @@ def authenticate(self, request):
47
if identity is None:
48
raise AuthenticationFailed
49
50
- identity_type = identity["type"]
51
- if identity == "User":
+ identity_type = identity.get("type", "User")
+ if identity_type == "User":
52
try:
53
identity = header['identity']
54
account = identity['account_number']
@@ -57,7 +57,7 @@ def authenticate(self, request):
57
username = user['username']
58
except KeyError:
59
60
- elif identity == "ServiceAccount":
+ elif identity_type == "ServiceAccount":
61
62
service_account = identity['service_account']
63
# service-account-<uuid4> is too long for the username field
0 commit comments