Getting only sub in UserInfoEndpoint

与世无争的帅哥 提交于 2020-01-03 17:19:50

问题


I am just following what is on the guide

I've already populated the user's profile information but so far I only get sub. I want to get something same like in the guide:

{ 
   "sub":"admin",
   "email":"admin@wso2.com",
   "website":"https://wso2.com",
   "name":"admin",
   "family_name":"admin",
   "preferred_username":"admin",
   "given_name":"admin",
   "profile":"https://wso2.com",
   "country":"Sri Lanka"
}

CONFIG

Identity Server - AWS Cloud with Domain and SSL + Nginx Proxy

Sample Web App - local machine

UPDATE:

  • It is an open bug. What is the workaround to get the other fields? Based on that jira, only the password grant is not fix, where to get the fix for code and impilict grant?

  • I tried hosting the IS also locally, same results


回答1:


To retrieve OIDC claim attributes to id_token or userinfo endpoint, the following steps needs to be done correctly(assuming you are working on IS 5.2.0).
1. Update relevant claims' Mapped Attribute with your underlying user store's matching attributes.
2. Update requested claims to Service provider [1].
3. Update missing attributes in '/_system/config/oidc' for scope 'openid' (Configuration changes in IS 5.2.0 [2]).



来源:https://stackoverflow.com/questions/40540393/getting-only-sub-in-userinfoendpoint

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!