Inverted the order of prefixes in Request.token property.

As suggested by @allan-simon
See: https://github.com/channelcat/sanic/pull/811#pullrequestreview-46144327
This commit is contained in:
François KUBLER 2017-06-27 12:57:47 +02:00
parent 55f860da2f
commit d2e14abfd5

View File

@ -86,7 +86,7 @@ class Request(dict):
:return: token related to request
"""
prefixes = ('Token ', 'Bearer ')
prefixes = ('Bearer', 'Token ')
auth_header = self.headers.get('Authorization')
if auth_header is not None: