WSO2 API Manager - Getting the error - Authentication Failure

送分小仙女□ 提交于 2019-12-02 12:29:21

问题


I am trying out WS02 API Manager but getting the following error when I send the REST API call -

<ams:fault xmlns:ams="http://wso2.org/apimanager/security">
   <ams:code>900901</ams:code>
   <ams:message>Authentication Failure</ams:message>
   <ams:description>Authentication failure for API: /api, version: 1 with key:     h0Bwxc94aBf6RJVnhtZeBqwp_hIa</ams:description>
</ams:fault>

The key is the production key for the user and that user is subscribed to this API.

The raw request looks like this

GET http://192.168.13.83:8280/api/1 HTTP/1.1
Accept-Encoding: gzip,deflate
Authorization: Bearer h0Bwxc94aBf6RJVnhtZeBqwp_hIa

The stack trace shows -

[2012-07-06 14:38:40,210] ERROR - APIAuthenticationHandler API authentication failure
org.wso2.carbon.apimgt.handlers.security.APISecurityException: Authentication failure       for API: /api, version: 1 with key: h0Bwxc94aBf6RJVnhtZeBqwp_hIa
        at      org.wso2.carbon.apimgt.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthent    icator.java:77)
        at     org.wso2.carbon.apimgt.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenti    cationHandler.java:82)
        at org.apache.synapse.rest.API.process(API.java:251)
        at     org.apache.synapse.rest.RESTRequestHandler.dispatchToAPI(RESTRequestHandler.java:76)
        at     org.apache.synapse.rest.RESTRequestHandler.process(RESTRequestHandler.java:63)
        at      org.apache.synapse.core.axis2.Axis2SynapseEnvironment.injectMessage(Axis2SynapseEnvironment    .java:180)
        at     org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83     )
        at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:181)
        at      org.apache.axis2.transport.http.util.RESTUtil.invokeAxisEngine(RESTUtil.java:144)
        at     org.apache.axis2.transport.http.util.RESTUtil.processURLRequest(RESTUtil.java:139)
        at      org.apache.synapse.transport.nhttp.util.RESTUtil.processGetAndDeleteRequest(RESTUtil.java:1    39)
        at     org.apache.synapse.transport.nhttp.DefaultHttpGetProcessor.processGetAndDelete(DefaultHttpG    etProcessor.java:464)
        at     org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor.process(NHttpGetProcessor.java:296)
        at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:258)
        at     org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172)
        at     java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
        at     java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
        at java.lang.Thread.run(Thread.java:662)

Can anyone please tell me what can be wrong here.

来源:https://stackoverflow.com/questions/11360769/wso2-api-manager-getting-the-error-authentication-failure

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!