From da5cdba08c42865af8d6ac61b9026743149b0c99 Mon Sep 17 00:00:00 2001 From: Jian Zhang <1196037552@qq.com> Date: Thu, 10 May 2018 08:10:10 -0500 Subject: [PATCH] add Bearer string (#284) --- src/apb/engine.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/apb/engine.py b/src/apb/engine.py index fe16a7b..4ced578 100644 --- a/src/apb/engine.py +++ b/src/apb/engine.py @@ -431,7 +431,7 @@ def relist_service_broker(kwargs): kwargs['basic_auth_password'])) } elif kwargs['auth_token'] is not None: - headers = {'Authorization': kwargs['auth_token']} + headers = {'Authorization': "Bearer " + kwargs['auth_token']} else: headers = {'Authorization': token} @@ -758,7 +758,7 @@ def broker_request(broker, service_route, method, **kwargs): kwargs['basic_auth_password'])) } elif kwargs['auth_token'] is not None: - headers = {'Authorization': kwargs['auth_token']} + headers = {'Authorization': "Bearer " + kwargs['auth_token']} else: token = openshift_client.Configuration().get_api_key_with_prefix('authorization') headers = {'Authorization': token}