0
votes
  1. I have following claim configuration in SP (note http://wso2.org/claims/role has been added) enter image description here

  2. role claim in http://wso2.org/claims dialect as follows enter image description here

  3. Now I have added the mapping "Role" claim to http://wso2.org/oidc/claim dialect which has same Mapped Attribute (role)

enter image description here

  1. Then added the "roles" claim uri to the openid scope defined in registry at /_system/config/oidc enter image description here

But still I can not get any roles by accessing userinfo EP.

curl -k -H "Authorization: Bearer 7f5b531c-f1d9-3775-8de8-30acf09e8673" https://localhost:9443/oauth2/userinfo?schema=openid

returns {"sub":"[email protected]","name":"admin","family_name":"admine","email":"[email protected]"}

Can anybody point out if I missed anything?

1

1 Answers

1
votes

You are missing to tick "support by default" option in step-03. You can find more details here [1].

[1] http://workaroundz.blogspot.com/2016/10/define-custom-claims-for-openid-connect.html