Merge pull request #2772 from jplana/fix_userinfo_authorization
Fixes userinfo using Bearer token
This commit is contained in:
commit
06ccafeb24
|
@ -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'])
|
||||||
|
|
Loading…
Reference in New Issue