Skip to content

Commit

Permalink
✨ adding user information
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianazioti committed Feb 24, 2023
1 parent 680d387 commit ecac7c9
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions bdc_auth_client/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def wrapped(*args, **kwargs):
kwargs.update(dict(roles=res['sub']['roles'] or []))
kwargs.update(dict(access_token=access_token))
kwargs.update(dict(user_id=res.get('user_id', None)))
kwargs.update(dict(user=res['sub']['user'] or []))
kwargs.update(dict(user=res['sub']['user'] or None))


else:
Expand Down Expand Up @@ -106,7 +106,7 @@ def wrapped(*args, **kwargs):
abort(403, HTTP_403_MSG)

user_roles = res['sub'].get('roles', [])
user = res['sub'].get('user', [])
user = res['sub'].get('user', None)
kwargs.update(dict(roles=user_roles))
kwargs.update(dict(access_token=access_token))
kwargs.update(dict(user_id=res.get('user_id', None)))
Expand Down

0 comments on commit ecac7c9

Please sign in to comment.