diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2019-05-07 20:42:30 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-07 20:42:30 +0200 |
commit | 58995124a96646930e5d4f12b8221a11ea210288 (patch) | |
tree | e3b07839c16b273dc47e8a6663aac1ba11b81c8a /oauthlib/oauth2/rfc6749 | |
parent | 71be50afdeaf99a0ba6ce5048851dcdd5620d880 (diff) | |
parent | b6b4d9fa68afa7a588015722f4d3d359b3a86b1f (diff) | |
download | oauthlib-58995124a96646930e5d4f12b8221a11ea210288.tar.gz |
Merge branch 'master' into 670-pkce-requestinfo
Diffstat (limited to 'oauthlib/oauth2/rfc6749')
-rw-r--r-- | oauthlib/oauth2/rfc6749/request_validator.py | 3 | ||||
-rw-r--r-- | oauthlib/oauth2/rfc6749/tokens.py | 4 |
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 |