From d10649e1f16bf09cbe5a96c6231ebd8f6bae7f90 Mon Sep 17 00:00:00 2001 From: Fabio Manganiello Date: Thu, 31 Dec 2020 15:36:38 +0100 Subject: [PATCH] Support for token over Authorization: Bearer header --- platypush/backend/http/app/utils.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/platypush/backend/http/app/utils.py b/platypush/backend/http/app/utils.py index 19143321f..3233fd851 100644 --- a/platypush/backend/http/app/utils.py +++ b/platypush/backend/http/app/utils.py @@ -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: