WSO2 Get UserInfo返回错误java null异常

时间:2018-01-04 02:02:16

标签: java apache wso2 identityserver4

我已经使用wso2设置了一个身份服务器,并且已经获得了一个令牌,但是当我使用令牌获取userinfo时,我收到内部服务器错误。

请求机构获取令牌。

grant_type=password&username=erwin&password=admin&scope=openid

令牌结果

    {
      "access_token": "9689f5f4-8ba0-398c-91d0-46dfac85b64a",
      "refresh_token": "497e57a4-21ff-3dca-a97f-687446c25321",
      "scope": "openid",
      "id_token": "eyJ4NXQiOiJOVEF4Wm1NeE5ETXlaRGczTVRVMVpHTTBNekV6T0RKaFpXSTRORE5sWkRVMU9HRmtOakZpTVEiLCJraWQiOiJOVEF4Wm1NeE5ETXlaRGczTVRVMVpHTTBNekV6T0RKaFpXSTRORE5sWkRVMU9HRmtOakZpTVEiLCJhbGciOiJSUzI1NiJ9.eyJhdF9oYXNoIjoiU0U4OVRxTkt2U3JWSWRnVXk2eE5XQSIsImFjciI6InVybjptYWNlOmluY29tbW9uOmlhcDpzaWx2ZXIiLCJzdWIiOiJlcndpbiIsImF1ZCI6WyJuU08xSTQyZ043a1JYZE9CdXdZbXNBMTdDY29hIl0sImF6cCI6Im5TTzFJNDJnTjdrUlhkT0J1d1ltc0ExN0Njb2EiLCJpc3MiOiJsb2NhbGhvc3QiLCJleHAiOjE1MTUwMzM3NDQsImlhdCI6MTUxNTAzMDE0NH0.Vz5K38k3UivwayYQWQVO86njwI48I5KpZiEqwrXethIZQ990JYZ1U6MiFEuKzA5Z3AZkDH2_HmHQeTSrjb7GUlIwejOtl7ky6Wc6uAD3a6YidWHAb1BLygX91KNwYdmgZ5ReyrJyZQ5Vri1qOhFfPFHKzkTgyKFZtJDDNvQ_SL8MxyaPer4rneEziXyYxZKJ0RrTnhOJVQ-TE0TxszlvNW4wAzmk_eVu9JDEycJdwAo1GS4U8tjqJPrMRdZNp371rS_-HHa5oSl-wVCEswtsKEoV5UeqKIeJoj0yGIFRqJxhpY9yxMSn-6jeviRBh40QstDNxFeluDpC8B6o7YIzmA",
      "token_type": "Bearer",
      "expires_in": 3594
    }

我使用该访问令牌获取用户信息,

https://localhost:9443/oauth2/userinfo?schema=openid  
Authorization : Bearer 9689f5f4-8ba0-398c-91d0-46dfac85b64a
Method : GET

结果是错误

    Exception report

message org.apache.cxf.interceptor.Fault

description The server encountered an internal error that prevented it from fulfilling this request.

exception

java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
    org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
    org.apache.cxf.phase.PhaseInterceptorChain.doIntercept(PhaseInterceptorChain.java:336)
    ...

root cause

org.apache.cxf.interceptor.Fault
    org.apache.cxf.service.invoker.AbstractInvoker.createFault(AbstractInvoker.java:170)
    ...

root cause

java.lang.NullPointerException
    org.wso2.carbon.identity.openidconnect.AbstractUserInfoResponseBuilder.getRequestObject(AbstractUserInfoResponseBuilder.java:298)
    ...

2 个答案:

答案 0 :(得分:0)

已针对IS 5.4.0报告此问题。

https://github.com/wso2/product-is/issues/1953

答案 1 :(得分:0)