Skip to content

Commit

Permalink
Merge pull request #798 from uc-cdis/fix/ras/username
Browse files Browse the repository at this point in the history
(fix) RAS perefer UserID
  • Loading branch information
BinamB committed Jul 17, 2020
2 parents 5128b8c + bf696a8 commit b70cc0f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions fence/resources/openid/ras_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ def get_user_id(self, code):
return {"error": err_msg}

username = None
if userinfo.get("preferred_username"):
username = userinfo["preferred_username"]
elif userinfo.get("UserID"):
if userinfo.get("UserID"):
username = userinfo["UserID"]
elif userinfo.get("preferred_username"):
username = userinfo["preferred_username"]
elif claims.get("sub"):
username = claims["sub"]
if not username:
Expand Down

0 comments on commit b70cc0f

Please sign in to comment.