Skip to content

Commit

Permalink
Merge pull request #854 from uc-cdis/feat/idp-info
Browse files Browse the repository at this point in the history
feat(userinfo): include identity provider name in userinfo response f…
  • Loading branch information
Avantol13 authored and themarcelor committed Jan 7, 2021
1 parent 6bf8a2b commit 7c295db
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fence/resources/user/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ def get_user_info(current_session, username):
info = {
"user_id": user.id, # TODO deprecated, use 'sub'
"sub": user.id,
# getattr b/c the identity_provider sqlalchemy relationship could not exists (be None)
"idp": getattr(user.identity_provider, "name", ""),
"username": user.username, # TODO deprecated, use 'name'
"name": user.username,
"display_name": user.display_name, # TODO deprecated, use 'preferred_username'
Expand Down

0 comments on commit 7c295db

Please sign in to comment.