forked from platypush/platypush
Support for token over Authorization: Bearer header
This commit is contained in:
parent
e127f2597c
commit
d10649e1f1
1 changed files with 2 additions and 0 deletions
|
@ -112,6 +112,8 @@ def _authenticate_token():
|
|||
|
||||
if 'X-Token' in request.headers:
|
||||
user_token = request.headers['X-Token']
|
||||
elif 'Authorization' in request.headers and request.headers['Authorization'].startswith('Bearer '):
|
||||
user_token = request.headers['Authorization'][len('Bearer '):]
|
||||
elif 'token' in request.args:
|
||||
user_token = request.args.get('token')
|
||||
else:
|
||||
|
|
Loading…
Reference in a new issue