Skip to content

Commit

Permalink
Merge eb10510 into 423e1f2
Browse files Browse the repository at this point in the history
  • Loading branch information
BinamB committed Oct 12, 2021
2 parents 423e1f2 + eb10510 commit 59ef231
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions fence/resources/openid/ras_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def get_encoded_visas_v11_userinfo(self, userinfo, pkey_cache=None):

def get_user_id(self, code):

err_msg = "Can't get user's info"
err_msg = "Unable to parse UserID from RAS userinfo response"

try:
token_endpoint = self.get_value_from_discovery_doc("token_endpoint", "")
Expand Down Expand Up @@ -179,15 +179,6 @@ def get_user_id(self, code):
if userinfo.get("UserID"):
username = userinfo["UserID"]
field_name = "UserID"
elif userinfo.get("userid"):
username = userinfo["userid"]
field_name = "userid"
elif userinfo.get("preferred_username"):
username = userinfo["preferred_username"]
field_name = "preferred_username"
elif claims.get("sub"):
username = claims["sub"]
field_name = "sub"
if not username:
self.logger.error(
"{}, received claims: {} and userinfo: {}".format(
Expand Down

0 comments on commit 59ef231

Please sign in to comment.