Support for token over Authorization: Bearer header

This commit is contained in:
fabio-eiq 2020-12-31 15:36:38 +01:00
parent e127f2597c
commit d10649e1f1
1 changed files with 2 additions and 0 deletions

View File

@ -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: