首页 文章

WSO2的WSO2 API作为KeyManager - 使用OAuth授权时的NPE

提问于
浏览
0

拥有WSO2 API Manager 2.1.0和WSO2 IS 5.3.0 KM(使用预先打包的密钥管理器)我将密钥管理器设置为described in the documentation .

主要目的是对用户和其他联合IdP进行身份验证和授权,并添加一些授权功能 . 我的假设是,使用WSO2IS进行审核的用户将收到对定义的APP和API有效的OAuth令牌 .

到目前为止,所有在localhost上都有IS偏移1.我创建了一个API,一个应用程序,可以在API Store中使用 .

尝试通过WSO2 IS使用代码grant_type授权来授权客户端时:

https://localhost:9444/oauth2/authorize?response_type=code&client_id=KJTbkbFmcDvslo2fjhzfQkaBH3Ea&redirect_uri=http%3A//localhost%3A8080/test2/callback

我被要求提供凭证和授权授权(看起来没问题)然后我在IS上收到一个例外:

[2018-03-27 10:43:51,822] ERROR {org.apache.catalina.core.StandardWrapperValve} -  Servlet.service() for servlet [OAuth2Endpoints] in context with path [/oauth2] threw exception
java.lang.RuntimeException: org.apache.cxf.interceptor.Fault
        at org.apache.cxf.interceptor.AbstractFaultChainInitiatorObserver.onMessage(AbstractFaultChainInitiatorObserver.java:116)
...
 Caused by: java.lang.NullPointerException
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorize(OAuth2AuthzEndpoint.java:251)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.sendRequestToFramework(OAuth2AuthzEndpoint.java:1163)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorize(OAuth2AuthzEndpoint.java:135)
        at org.wso2.carbon.identity.oauth.endpoint.authz.OAuth2AuthzEndpoint.authorizePost(OAuth2AuthzEndpoint.java:574)

我假设我错误配置了一些 endpoints ,但是 - 任何想法OAuth2AuthzEndpoint实现调用哪个服务或者导致此异常的潜在原因?

1 回答

相关问题