Merge branch 'master' of https://github.com/juanifioren/django-oidc-provider into v0.1.0-dev
Conflicts: oidc_provider/lib/endpoints/authorize.py
This commit is contained in:
commit
5371fbfba9
6 changed files with 94 additions and 18 deletions
|
@ -10,7 +10,7 @@ from oidc_provider.models import *
|
|||
from oidc_provider import settings
|
||||
|
||||
|
||||
def create_id_token(user, aud):
|
||||
def create_id_token(user, aud, nonce=None):
|
||||
"""
|
||||
Receives a user object and aud (audience).
|
||||
Then creates the id_token dictionary.
|
||||
|
@ -39,6 +39,9 @@ def create_id_token(user, aud):
|
|||
'auth_time': auth_time,
|
||||
}
|
||||
|
||||
if nonce:
|
||||
dic['nonce'] = nonce
|
||||
|
||||
return dic
|
||||
|
||||
|
||||
|
@ -86,4 +89,4 @@ def create_code(user, client, scope):
|
|||
seconds=settings.get('OIDC_CODE_EXPIRE'))
|
||||
code.scope = scope
|
||||
|
||||
return code
|
||||
return code
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue