Skip to content

Commit

Permalink
feat(synapse): use userid as username
Browse files Browse the repository at this point in the history
  • Loading branch information
mfshao committed Nov 26, 2019
1 parent 9d96c91 commit 4973f72
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions fence/resources/openid/synapse_oauth2.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,9 @@ class SynapseOauth2Client(Oauth2ClientBase):
"""

REQUIRED_CLAIMS = {"given_name", "family_name", "email", "email_verified"}
REQUIRED_CLAIMS = {"given_name", "family_name", "email", "email_verified", "userid"}
OPTIONAL_CLAIMS = {
# "company",
# "userid",
# "orcid",
# "is_certified",
# "is_validated",
Expand Down Expand Up @@ -125,7 +124,7 @@ def get_user_id(self, code):
return dict(error="Required claim {} not found".format(claim))
else:
rv[claim] = value
rv["fence_username"] = rv["email"] + " (via Synapse)"
rv["fence_username"] = rv["userid"] + " (via Synapse)"
return rv
except Exception as e:
self.logger.exception("Can't get user info")
Expand Down

0 comments on commit 4973f72

Please sign in to comment.