Skip to content

Commit

Permalink
Fixup.
Browse files Browse the repository at this point in the history
No-Issue

Signed-off-by: James Tanner <[email protected]>
  • Loading branch information
jctanner committed Nov 12, 2024
1 parent e69a713 commit 0b78425
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions galaxy_ng/app/auth/auth.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,8 @@ def authenticate(self, request):
if identity is None:
raise AuthenticationFailed

identity_type = identity["type"]
if identity == "User":
identity_type = identity.get("type", "User")
if identity_type == "User":
try:
identity = header['identity']
account = identity['account_number']
Expand All @@ -57,7 +57,7 @@ def authenticate(self, request):
username = user['username']
except KeyError:
raise AuthenticationFailed
elif identity == "ServiceAccount":
elif identity_type == "ServiceAccount":
try:
service_account = identity['service_account']
# service-account-<uuid4> is too long for the username field
Expand Down

0 comments on commit 0b78425

Please sign in to comment.