【发布时间】:2015-08-21 14:15:11
【问题描述】:
使用以下 Python 代码测试 Oauth2 的 oauth2/userprofile 查询:
verify='/home/claudef/tmp/oauth2/oauth/wso2.pem'
url = "https://extbasicpacman05.podc.sl.edst.red.com:9443/oauth2/userinfo?schema=openid"
headers = { 'Authorization' : "Bearer " + access_token }
r = requests.get(url, headers=headers, verify=verify)
我从 WSO2 身份服务器收到以下错误消息:
error":"insufficient_scope","error_description":"Access token does not have the openid scope"
检查从不记名令牌发射返回的数据,我看到默认值 scope=profile,它与 userinfo 查询中的默认值不匹配,可能使用值 scope=openid。
u'token_type': u'bearer', u'scope': u'profile', u'access_token': u'7ae4542fe322d3aba67bf0625039d5f6', u'expires_in': 73, u'refresh_token': u'92d915a25d8bef6ca7ec7b70664c5cbf'}
使用 cURL 命令时也会出现同样的错误。
请给我一些指导如何解决此问题以从 WSO2 服务器读取用户信息数据。
【问题讨论】:
标签: wso2 token identity wso2is