我目前正在 Amazon EC2 上部署 WSO2 API 管理器解决方案。
每次重新启动实例后,我都面临以下问题:我的所有访问令牌都变为非活动状态。
<ams:code>900904</ams:code><ams:message>Access Token Inactive</ams:message>
我已经在 identity.xml 配置文件 (/repository/conf/identity.xml) 中将“ApplicationAccessTokenDefaultValidityPeriod”值更改为 0,但它并没有阻止我的令牌处于非活动状态。
每次实例重启后,有没有办法让我生成的所有令牌保持活动状态?
PS:当我重新启动我的 wso2 应用程序而不重新启动我的 ec2 实例时,不会发生此错误。
错误日志:
错误 - APIAuthenticationHandler API 身份验证失败 org.wso2.carbon.apimgt.gateway.handlers.security.APISecurityException:API 访问失败:/test,版本:1.0.3,密钥:bLhh7pDxZ8NYwXz5k09nGO_Udcga
at org.wso2.carbon.apimgt.gateway.handlers.security.oauth.OAuthAuthenticator.authenticate(OAuthAuthenticator.java:135) at org.wso2.carbon.apimgt.gateway.handlers.security.APIAuthenticationHandler.handleRequest(APIAuthenticationHandler.java:88) at org.apache.synapse.rest.API.process(API.java:252) 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:191) at org.apache.synapse.core.axis2.SynapseMessageReceiver.receive(SynapseMessageReceiver.java:83) at org.apache.axis2.engine.AxisEngine.receive(AxisEngine.java:180) 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:146) at org.apache.synapse.transport.nhttp.DefaultHttpGetProcessor.processGetAndDelete(DefaultHttpGetProcessor.java:464) at org.wso2.carbon.transport.nhttp.api.NHttpGetProcessor.process(NHttpGetProcessor.java:296) at org.apache.synapse.transport.nhttp.ServerWorker.run(ServerWorker.java:272) at org.apache.axis2.transport.base.threads.NativeWorkerPool$1.run(NativeWorkerPool.java:172) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615) at java.lang.Thread.run(Thread.java:724)