Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
juanifioren committed Oct 17, 2018
2 parents b875ba5 + 22cda50 commit 2028290
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions oidc_provider/lib/utils/token.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,11 +55,12 @@ def create_id_token(token, user, aud, nonce='', at_hash='', request=None, scope=

# Inlude (or not) user standard claims in the id_token.
if settings.get('OIDC_IDTOKEN_INCLUDE_CLAIMS'):
standard_claims = StandardScopeClaims(token)
dic.update(standard_claims.create_response_dic())
if settings.get('OIDC_EXTRA_SCOPE_CLAIMS'):
custom_claims = settings.get('OIDC_EXTRA_SCOPE_CLAIMS', import_str=True)(token)
dic.update(custom_claims.create_response_dic())
claims = custom_claims.create_response_dic()
else:
claims = StandardScopeClaims(token).create_response_dic()
dic.update(claims)

dic = run_processing_hook(
dic, 'OIDC_IDTOKEN_PROCESSING_HOOK',
Expand Down

0 comments on commit 2028290

Please sign in to comment.