diff options
author | Joel Stevenson <jstevenson@bepress.com> | 2016-08-18 15:29:01 -0700 |
---|---|---|
committer | Joel Stevenson <jstevenson@bepress.com> | 2016-08-18 15:29:01 -0700 |
commit | 447465547cc9a14350d024ed25b374614c475eec (patch) | |
tree | db6a1aca50bb431f47412d7272c5aa6e627fcdd3 /oauthlib/oauth2/rfc6749/grant_types/authorization_code.py | |
parent | 9a8f73d2dd088d5ea01313de2a1fe5a877994a79 (diff) | |
download | oauthlib-447465547cc9a14350d024ed25b374614c475eec.tar.gz |
Move the claims handling into OpenIDConnectBase._inflate_claims() and a new AuthCodeGrantDispatcher to route requests to either the default AuthorizationCodeGrant or OpenIDConnectAuthCode depending on scope when the request's response_type is a simple (ambiguous) 'code'.
Include basic docs about OpenID Connect auth flow support
Diffstat (limited to 'oauthlib/oauth2/rfc6749/grant_types/authorization_code.py')
-rw-r--r-- | oauthlib/oauth2/rfc6749/grant_types/authorization_code.py | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py index 3a77fd9..d4292cb 100644 --- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py +++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py @@ -367,25 +367,12 @@ class AuthorizationCodeGrant(GrantTypeBase): # http://tools.ietf.org/html/rfc6749#section-3.3 self.validate_scopes(request) - # validate_authorization_request may be called multiple times in a single request - # so make sure we only de-serialize the claims once - if request.claims and not isinstance(request.claims, dict) and request.scopes and "openid" in request.scopes: - # specific claims are requested during the Authorization Request and may be requested for inclusion - # in either the id_token or the UserInfo endpoint response - # see http://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter - try: - request.claims = json.loads(request.claims) - except Exception as ex: - raise errors.InvalidRequestError(description="Malformed claims parameter", - uri="http://openid.net/specs/openid-connect-core-1_0.html#ClaimsParameter") - request_info = { 'client_id': request.client_id, 'redirect_uri': request.redirect_uri, 'response_type': request.response_type, 'state': request.state, - 'request': request, - 'claims': request.claims + 'request': request } for validator in self._authorization_validators: |