Refactoring create_id_token function.

This commit is contained in:
Ignacio Fiorentino 2016-09-09 13:10:12 -03:00
parent 5836774f6b
commit 8a63c83514
7 changed files with 41 additions and 15 deletions

View file

@ -151,6 +151,7 @@ class AuthorizeEndpoint(object):
'aud': self.client.client_id,
'nonce': self.params.nonce,
'request': self.request,
'scope': self.params.scope,
}
# Include at_hash when access_token is being returned.
if 'access_token' in query_fragment:

View file

@ -153,6 +153,7 @@ class TokenEndpoint(object):
nonce=self.code.nonce,
at_hash=token.at_hash,
request=self.request,
scope=self.params.scope,
)
else:
id_token_dic = {}
@ -188,6 +189,7 @@ class TokenEndpoint(object):
nonce=None,
at_hash=token.at_hash,
request=self.request,
scope=self.params.scope,
)
else:
id_token_dic = {}