Warning: file_get_contents(/data/phpspider/zhask/data//catemap/6/multithreading/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
wso2 api manager 1.10无法重新生成令牌_Wso2_Wso2 Am - Fatal编程技术网

wso2 api manager 1.10无法重新生成令牌

wso2 api manager 1.10无法重新生成令牌,wso2,wso2-am,Wso2,Wso2 Am,我下载并安装了WSOAM1.10二进制文件,并遵循了分布式部署的步骤。在商店中输入“我的订阅”选项卡时,我无法为我订阅的API重新生成密钥,并获取HTTP 400错误。密钥管理器日志显示: TID: [-1234] [] [2017-03-07 20:26:14,730] ERROR {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} - Error while creating the Carbon OAut

我下载并安装了WSOAM1.10二进制文件,并遵循了分布式部署的步骤。在商店中输入“我的订阅”选项卡时,我无法为我订阅的API重新生成密钥,并获取HTTP 400错误。密钥管理器日志显示:

TID: [-1234] [] [2017-03-07 20:26:14,730] ERROR {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint} -  Error while creating the Carbon OAuth token request {org.wso2.carbon.identity.oauth.endpoint.token.OAuth2TokenEndpoint}
OAuthProblemException{error='invalid_request', description='Missing grant_type parameter value', uri='null', state='null', scope='null', redirectUri='null', responseStatus=0, parameters={}}
        at org.apache.oltu.oauth2.common.exception.OAuthProblemException.error(OAuthProblemException.java:59)
        at org.apache.oltu.oauth2.common.utils.OAuthUtils.handleOAuthProblemException(OAuthUtils.java:167)
...

I get the same if I use a curl command: 
curl -k -v -d "token=224cd22cd6b4ee622d951c69be34f633&grant_type=client_credentials" -H "Authorization: Basic eG9HSnZDS3FYNVNSazV6N3FHZXhhR3VTSWVnYTpzUTQ0QlBmTXRacG1ZNnA3ZUdPejhONVZxMGdh" -H "Content-Type: application/x-www-form-urlencoded" http:GATEWAY_HOST/revoke

看起来吊销API调用缺少“grant_type”参数。文件是否正确

此文档是正确的。以下是生成令牌和撤销令牌的示例命令

curl-k-d“授权类型=客户端凭据”-H“授权:基本 DKFGR0PLQWLIMDVRUW5FX2JZFGZS1PEAGZVYTO2NDFGLNTSVJ2ANVIU0OZCTYZBHVENXUMLLH”

旋度-k-v-d“标记=77ed4636c08c80fefb6f7aa1ce6987e0”-H “授权:基本授权 DKFGR0PLQWLIMDVRUW5FX2JZFGZS1PEAGZVYTO2NDFGLNTSVJ2ANVIU0OZCTYZBHVENXUMLLH” -H“内容类型:应用程序/x-www-form-urlencoded”


根据堆栈跟踪,当您试图撤销令牌时,调用会转到需要授权类型来生成令牌的令牌端点。请检查synapse中的默认api(wso2am-1.10.0/repository/deployment/server/synapse configs/default/api)以验证端点是否正确。

是,您似乎缺少授权类型。它通常是
password
refresh\u token
,但它取决于API文档。因此,在分布式环境中,API Mgr存储可以通过调用http://[API Mgr Gateway]:端口/撤销URL来撤销令牌。然后网关将使用SynapseAPI通过URL http://[key Mgr]:PORT/oauth2/token调用密钥管理器。这是正确的吗?你的部分解释是正确的。存储将调用网关中的吊销端点。如果您检查synapse中的RevokeAPI.xml,它是RevokeAPI,那么调用将转到http://[Key Mgr]:PORT/oauth2/revoke。对于撤销令牌,我们使用撤销端点。