summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
diff options
context:
space:
mode:
authorFabian Fuelling <git@fabfuel.de>2016-10-03 10:38:38 +0200
committerFabian Fuelling <git@fabfuel.de>2016-10-03 10:38:38 +0200
commit335d9e8b427163bc64c18cb7ad54e609fcd84b23 (patch)
tree78128d3fa73ce450b321bfa1e8029f5f003d023d /oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
parent83ed13701707b19420773f18a32aa8b688ae7a3c (diff)
downloadoauthlib-335d9e8b427163bc64c18cb7ad54e609fcd84b23.tar.gz
Ensure request.client_id after checking request.client.client_id
Diffstat (limited to 'oauthlib/oauth2/rfc6749/grant_types/authorization_code.py')
-rw-r--r--oauthlib/oauth2/rfc6749/grant_types/authorization_code.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
index 55e2784..09756a1 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
@@ -415,6 +415,8 @@ class AuthorizationCodeGrant(GrantTypeBase):
'request.client.client_id attribute '
'in authenticate_client.')
+ request.client_id = request.client_id or request.client.client_id
+
# Ensure client is authorized use of this grant type
self.validate_grant_type(request)
@@ -439,8 +441,6 @@ class AuthorizationCodeGrant(GrantTypeBase):
request.redirect_uri, request.client_id, request.client)
raise errors.AccessDeniedError(request=request)
- request.client_id = request.client_id or request.client.client_id
-
for validator in self._token_validators:
validator(request)