有没有办法从 OneLogin 的“个人资料”范围获取“图片”?
Is there any way to get `picture` from OneLogin's `profile` scope?
profile
范围的 OneLogin OpenID Connect Scopes Documentation 显示有一个 picture
可用,但带有此免责声明:
Note, these claims are returned if OneLogin has the information available.
在测试中,我从未 picture
与具有个人资料照片集的用户进行测试时返回。我得到的只有这些属性:
{
"id_token": "",
"token_type": "Bearer",
"scope": "openid profile",
"profile": {
"sub": "",
"email": "",
"preferred_username": "",
"name": "",
"updated_at": 1614904145,
"given_name": "",
"family_name": "",
"sid": ""
},
"expires_at": 1615761073
}
如能提供有关如何从 OneLogin 获取附加字段的任何提示,我们将不胜感激。谢谢!
我联系了 OneLogin 的开发支持,并在几个小时内得到了回复。我已经验证这有效,这里是:
You should add a parameter to your OIDC app and map it to the field "Profile Picture" and then include the params scope in your ODIC call. (fro more details on scopes see https://developers.onelogin.com/openid-connect/scopes)
Note - what you get back is the URL of an image and it is not a binary blob of the actual photo.
profile
范围的 OneLogin OpenID Connect Scopes Documentation 显示有一个 picture
可用,但带有此免责声明:
Note, these claims are returned if OneLogin has the information available.
在测试中,我从未 picture
与具有个人资料照片集的用户进行测试时返回。我得到的只有这些属性:
{
"id_token": "",
"token_type": "Bearer",
"scope": "openid profile",
"profile": {
"sub": "",
"email": "",
"preferred_username": "",
"name": "",
"updated_at": 1614904145,
"given_name": "",
"family_name": "",
"sid": ""
},
"expires_at": 1615761073
}
如能提供有关如何从 OneLogin 获取附加字段的任何提示,我们将不胜感激。谢谢!
我联系了 OneLogin 的开发支持,并在几个小时内得到了回复。我已经验证这有效,这里是:
You should add a parameter to your OIDC app and map it to the field "Profile Picture" and then include the params scope in your ODIC call. (fro more details on scopes see https://developers.onelogin.com/openid-connect/scopes)
Note - what you get back is the URL of an image and it is not a binary blob of the actual photo.