【发布时间】:2017-07-28 05:39:00
【问题描述】:
我下载并安装了 WSOAM 1.10 二进制文件,并按照步骤https://docs.wso2.com/display/CLUSTER44x/Clustering+API+Manager+1.10.0 进行分布式部署。在商店中进入“我的订阅”选项卡后,我无法为我订阅的 API 重新生成密钥并收到 HTTP 400 错误。 Key Mgr 日志显示:
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”参数。文档是否正确? :https://docs.wso2.com/display/AM1100/Token+API
【问题讨论】:
-
是的,您似乎缺少授权类型。它通常是
password或refresh_token,但这取决于 API 文档。