Skip to content

Commit

Permalink
Fix #134
Browse files Browse the repository at this point in the history
Changes to be committed:
	modified:   authentication/services.py
  • Loading branch information
HadleyKing committed Jul 19, 2023
1 parent b8ed1cb commit 54a6763
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions authentication/services.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,12 @@ def authenticate(self, request):
user = authenticate_orcid(unverified_payload, token)
if unverified_payload['iss'] == 'accounts.google.com':
user = authenticate_google(token)
if unverified_payload['iss'] in ['http://localhost:8080', 'https://test.portal.biochemistry.gwu.edu/', 'https://biocomputeobject.org/']:
if unverified_payload['iss'] in ['http://localhost:8080', 'https://test.portal.biochemistry.gwu.edu', 'https://biocomputeobject.org']:
user = authenticate_portal(unverified_payload, token)

return (user, token)
try:
return (user, token)
except UnboundLocalError as exp:
raise exceptions.AuthenticationFailed("Authentication failed. Token issuer not found. Please contact the site admin")

if type == 'Token' or type == 'TOKEN':
pass
Expand Down

0 comments on commit 54a6763

Please sign in to comment.