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

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: