Merge pull request #2772 from jplana/fix_userinfo_authorization

Fixes userinfo using Bearer token
This commit is contained in:
Curtis 2019-05-07 08:46:18 -07:00 committed by GitHub
commit 06ccafeb24
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
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')
# 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()
user = user_service.get_by_email(profile['email'])