Skip to content

Commit 0b78425

Browse files
committed
Fixup.
No-Issue Signed-off-by: James Tanner <tanner.jc@gmail.com>
1 parent e69a713 commit 0b78425

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

galaxy_ng/app/auth/auth.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ def authenticate(self, request):
4747
if identity is None:
4848
raise AuthenticationFailed
4949

50-
identity_type = identity["type"]
51-
if identity == "User":
50+
identity_type = identity.get("type", "User")
51+
if identity_type == "User":
5252
try:
5353
identity = header['identity']
5454
account = identity['account_number']
@@ -57,7 +57,7 @@ def authenticate(self, request):
5757
username = user['username']
5858
except KeyError:
5959
raise AuthenticationFailed
60-
elif identity == "ServiceAccount":
60+
elif identity_type == "ServiceAccount":
6161
try:
6262
service_account = identity['service_account']
6363
# service-account-<uuid4> is too long for the username field

0 commit comments

Comments
 (0)