diff options
author | Jonathan Huot <JonathanHuot@users.noreply.github.com> | 2019-07-19 09:22:21 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-07-19 09:22:21 +0200 |
commit | fe9ec057f3cba2f8428ad666ad557d2f77188268 (patch) | |
tree | a4b4f4b8567e59f8b0558f2de8786af820cd0c54 /oauthlib/oauth2/rfc6749/tokens.py | |
parent | 9e824cfb0eb36b4d23ab73171b821b1a74ec659c (diff) | |
parent | d7b90fc841694f126ec63500ea8f74330c4672eb (diff) | |
download | oauthlib-fe9ec057f3cba2f8428ad666ad557d2f77188268.tar.gz |
Merge branch 'master' into release-3.0.2release-3.0.2
Diffstat (limited to 'oauthlib/oauth2/rfc6749/tokens.py')
-rw-r--r-- | oauthlib/oauth2/rfc6749/tokens.py | 4 |
1 files changed, 2 insertions, 2 deletions
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 |