Fixes userinfo using Bearer token

This commit is contained in:
Jose Plana 2019-05-01 00:47:56 +02:00
parent dfadcc52ef
commit 2063baefc9
1 changed files with 4 additions and 1 deletions

View File

@ -113,7 +113,10 @@ def retrieve_user(user_api_url, access_token):
user_params = dict(access_token=access_token, schema='profile') user_params = dict(access_token=access_token, schema='profile')
# retrieve information about the current user. # retrieve information about the current user.
r = requests.get(user_api_url, params=user_params) r = requests.get(
user_api_url,
params=user_params,
headers={'Authorization': 'Bearer {}'.format(access_token)})
profile = r.json() profile = r.json()
user = user_service.get_by_email(profile['email']) user = user_service.get_by_email(profile['email'])