summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
diff options
context:
space:
mode:
authorJoel Stevenson <joelstevenson@mac.com>2016-04-25 16:49:25 -0700
committerJoel Stevenson <joelstevenson@mac.com>2016-04-25 16:49:25 -0700
commit21f39752241c56ca4538d09e225f4653b9446d9e (patch)
tree6140b34572df732cc553ce7ac28158efc50ea0d6 /oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
parentbd3dcb88fb957bfa3e43409af8b59245e88d2163 (diff)
downloadoauthlib-21f39752241c56ca4538d09e225f4653b9446d9e.tar.gz
Handle multi-valued response_types as specified in http://openid.net/specs/oauth-v2-multiple-response-types-1_0.html#Combinations
Handle new 'none' response_type Implicit flow won't generate a token unless it is asked for (skipped for "id_token" response_type
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, 1 insertions, 3 deletions
diff --git a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
index d35b55a..2466c0d 100644
--- a/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
+++ b/oauthlib/oauth2/rfc6749/grant_types/authorization_code.py
@@ -122,8 +122,6 @@ class AuthorizationCodeGrant(GrantTypeBase):
def register_token_modifier(self, modifier):
self._token_modifiers.append(modifier)
- # END-NEW-FOR-OPENID
-
def create_authorization_code(self, request):
"""Generates an authorization grant represented as a dictionary."""
grant = {'code': common.generate_token()}
@@ -350,7 +348,7 @@ class AuthorizationCodeGrant(GrantTypeBase):
if request.response_type is None:
raise errors.MissingResponseTypeError(request=request)
# Value MUST be set to "code".
- elif not 'code' in request.response_type:
+ elif not 'code' in request.response_type and request.response_type != 'none':
raise errors.UnsupportedResponseTypeError(request=request)
if not self.request_validator.validate_response_type(request.client_id,