summaryrefslogtreecommitdiff
path: root/oauthlib/oauth2/rfc6749
diff options
context:
space:
mode:
authorJonathan Huot <JonathanHuot@users.noreply.github.com>2019-05-07 20:42:30 +0200
committerGitHub <noreply@github.com>2019-05-07 20:42:30 +0200
commit58995124a96646930e5d4f12b8221a11ea210288 (patch)
treee3b07839c16b273dc47e8a6663aac1ba11b81c8a /oauthlib/oauth2/rfc6749
parent71be50afdeaf99a0ba6ce5048851dcdd5620d880 (diff)
parentb6b4d9fa68afa7a588015722f4d3d359b3a86b1f (diff)
downloadoauthlib-58995124a96646930e5d4f12b8221a11ea210288.tar.gz
Merge branch 'master' into 670-pkce-requestinfo
Diffstat (limited to 'oauthlib/oauth2/rfc6749')
-rw-r--r--oauthlib/oauth2/rfc6749/request_validator.py3
-rw-r--r--oauthlib/oauth2/rfc6749/tokens.py4
2 files changed, 5 insertions, 2 deletions
diff --git a/oauthlib/oauth2/rfc6749/request_validator.py b/oauthlib/oauth2/rfc6749/request_validator.py
index d6ec2ab..86509b6 100644
--- a/oauthlib/oauth2/rfc6749/request_validator.py
+++ b/oauthlib/oauth2/rfc6749/request_validator.py
@@ -271,6 +271,9 @@ class RequestValidator(object):
- Code Challenge (``request.code_challenge``) and
- Code Challenge Method (``request.code_challenge_method``)
+ To support OIDC, you MUST associate the code with:
+ - nonce, if present (``code["nonce"]``)
+
The ``code`` argument is actually a dictionary, containing at least a
``code`` key with the actual authorization code:
diff --git a/oauthlib/oauth2/rfc6749/tokens.py b/oauthlib/oauth2/rfc6749/tokens.py
index 7973923..3587af4 100644
--- a/oauthlib/oauth2/rfc6749/tokens.py
+++ b/oauthlib/oauth2/rfc6749/tokens.py
@@ -254,7 +254,7 @@ def get_token_from_header(request):
if 'Authorization' in request.headers:
split_header = request.headers.get('Authorization').split()
- if len(split_header) == 2 and split_header[0] == 'Bearer':
+ if len(split_header) == 2 and split_header[0].lower() == 'bearer':
token = split_header[1]
else:
token = request.access_token
@@ -353,7 +353,7 @@ class BearerToken(TokenBase):
:param request: OAuthlib request.
:type request: oauthlib.common.Request
"""
- if request.headers.get('Authorization', '').split(' ')[0] == 'Bearer':
+ if request.headers.get('Authorization', '').split(' ')[0].lower() == 'bearer':
return 9
elif request.access_token is not None:
return 5