2
votes

I have used WSO2 Identity server 5.2.0 to implement oauth2 authorized flow. I have implemented it successfully. I got access token, but when I tried to fetch user information from WSO2 IS with following command:

curl -X GET -H "Authorization: Bearer 5e122a0e7276cd4f245e1be238002aa4" -H "Cache-Control: no-cache" -H "Postman-Token: 77faba9b-6a2e-d8ba-a3f6-25ff0da69979" "https://localhost:9443/oauth2/userinfo?schema=openid"

gives response:

{"sub":"[email protected]"}

But I need email, first name, last name, role, mobile no etc.

have done configuration suggested in : https://docs.wso2.com/display/IS500/Configuring+OpenID+Connect+Authorization+Server

I followed: https://wso2.org/jira/browse/IDENTITY-4250

with https://github.com/wso2/carbon-identity/pull/1688/ but I don`t understand how to use that build solution after building https://github.com/wso2/carbon-identity project. I have tried with WSO2 Identity server 5.1.0 also but got same response Please give any suggetion. Thanks in advance.

1

1 Answers

0
votes

IS 5.2.0 used WSO2 carbon oauth v5.1.3 features. So what you have to do is

  • Checkout the source for that component tag from here.
  • Apply the fix mentioned in the ticket on top of that tag.
  • Build the source with maven and get the oauth.war file.
  • Then replace the "repository/deployment/server/webapps/oauth.war" with the new one.
  • Remove the "repository/deployment/server/webapps/oauth2" directory.

Just for the safe side, back up the existing ones before you delete.