我正在使用WSO2 API Manager 2.6.0并将预打包的Identity Server 5.7.0配置为密钥管理器。当我在API Store中创建应用程序并生成密钥时,我可以看到在Identity Server中创建了服务提供程序。此外,我能够使用生成的消费者ID和秘密获取令牌。但是,当我将该令牌传递给我的API时,我收到了未分类的身份验证错误。以下是我在日志中可以看到的例外,
错误 - 由于未分类的身份验证失败导致APIAuthenticationHandler API身份验证失败org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:在org.wso2.carbon.apimgt.gateway.handlers.security访问API密钥验证的后端服务时出错.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:77)位于org.wso2.carbon.apimgt.gateway.handlers的org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.getAllURITemplates(APIKeyValidator.java:791)位于org.wso2.carbon.apimgt.gateway.handlers的org.wso2.carbon.apimgt.gateway.handlers.security.APIKeyValidator.findMatchingVerb(APIKeyValidator.java:573)的.security.APIKeyValidator.doGetAPIInfo(APIKeyValidator.java:639)位于org.wso2.carbon.apimgt.gateway的org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:127)上的.security.APIKeyValidator.getResourceAuthenticationScheme(APIKeyValidator.java:357) .handlers.security.APIAuthenticati org.apache.sisapse.rest.API.process(API。 java:325)atg.apache.synapse.rest.RESTRequestHandler.apiProcessNonDefaultStrategy(RESTRequestHandler.java:149)org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:95)at org.apache.synapse.rest位于org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment.java:303)的.RESTRequestHandler.process(RESTRequestHandler.java:71)org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java) :92)org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180)位于org.apache.synapse的org.apache.synapse.transport.passthru.ServerWorker.processNonEntityEnclosingRESTHandler(ServerWorker.java:337)。 transport.passthru.ServerWorker.processEntityEnclosingRequest(ServerWorker.java:383 )atg.apache.synapse.transport.passthru.ServerWorker.run(ServerWorker.java:151)atg.apache.axis2.transport.base.threads.NativeWorkerPool $ 1.run(NativeWorkerPool.java:172)at java.util .concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1149)at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:624)at java.lang.Thread.run(Thread.java:748)引起: org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:在org.wso2.carbon.apimgt.gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates访问API密钥验证的后端服务时出错(APIKeyValidatorClient.java: 189)at org.wso2.carbon.apimgt.gateway.handlers.security.keys.WSAPIKeyDataStore.getAllURITemplates(WSAPIKeyDataStore.java:75)... 21更多引起:org.wso2.carbon.apimgt的java.lang.NullPointerException .gateway.handlers.security.keys.APIKeyValidatorClient.getAllURITemplates(APIKeyValidatorClient.java:183)... 22更多
任何帮助将非常感激。
请与此问题交叉检查[1]