Skip to content

Commit

Permalink
Fixed bearer verification
Browse files Browse the repository at this point in the history
  • Loading branch information
vikipha committed Jan 31, 2020
1 parent 81d6501 commit a17a15a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion oauth2_provider/oauth2_backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def verify_request(self, request, scopes):
"""
uri, http_method, body, headers = self._extract_params(request)

if ('Authorization' in headers and headers.get('Authorization') == 'Bearer') or getattr(request, 'access_token', None):
if ('Authorization' in headers and headers.get('Authorization').startswith('Bearer')) or getattr(request, 'access_token', None):
valid, r = self.server.verify_request(uri, http_method, body, headers, scopes=scopes)
return valid, r
else:
Expand Down

0 comments on commit a17a15a

Please sign in to comment.