File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -39,10 +39,12 @@ def authenticate(self, request):
3939 user = authenticate_orcid (unverified_payload , token )
4040 if unverified_payload ['iss' ] == 'accounts.google.com' :
4141 user = authenticate_google (token )
42- if unverified_payload ['iss' ] in ['http://localhost:8080' , 'https://test.portal.biochemistry.gwu.edu/ ' , 'https://biocomputeobject.org/ ' ]:
42+ if unverified_payload ['iss' ] in ['http://localhost:8080' , 'https://test.portal.biochemistry.gwu.edu' , 'https://biocomputeobject.org' ]:
4343 user = authenticate_portal (unverified_payload , token )
44-
45- return (user , token )
44+ try :
45+ return (user , token )
46+ except UnboundLocalError as exp :
47+ raise exceptions .AuthenticationFailed ("Authentication failed. Token issuer not found. Please contact the site admin" )
4648
4749 if type == 'Token' or type == 'TOKEN' :
4850 pass
You can’t perform that action at this time.
0 commit comments