WebSphere Docker OAuth
WebSphere Docker OAuth
我需要针对 IBM WebSphere 服务器实施 OAuth。为此,我构建了一个 docker 环境 https://github.com/hhoechtl/websphere-oauth according to http://www.ibm.com/developerworks/websphere/techjournal/1305_odonnell2/1305_odonnell2.html
但如果我尝试获取令牌
curl -X POST -H "Accept-Charset: UTF-8" -H "Content-Type: application/x-www-form-urlencoded" -d 'grant_type=password&client_id=LibertyRocks&client_secret=AndMakesConfigurationEasy&username=admin&password=admin' "https://192.168.99.100:9443/oauth2/endpoint/DemoProvider/token"
我收到错误
{
"error_description": "CWWKS1406E: The token request had an invalid client credential. The request URI was /oauth2/endpoint/DemoProvider/token.",
"error": "invalid_client"
}
但根据我的 server.xml 这应该是正确的。我错过了什么?
您能为该调用打开并提供服务器跟踪吗?该消息表示在请求中未找到凭据,或者已找到凭据但对该客户端无效。了解这里的情况会很有用。
您可以通过将此代码段添加到您的 server.xml:
来启用跟踪
<logging traceSpecification="*=info=enabled:com.ibm.ws.security.*=all=enabled:com.ibm.oauth.*=all=enabled" />
第二天就成功了,不知道为什么。
我需要针对 IBM WebSphere 服务器实施 OAuth。为此,我构建了一个 docker 环境 https://github.com/hhoechtl/websphere-oauth according to http://www.ibm.com/developerworks/websphere/techjournal/1305_odonnell2/1305_odonnell2.html
但如果我尝试获取令牌
curl -X POST -H "Accept-Charset: UTF-8" -H "Content-Type: application/x-www-form-urlencoded" -d 'grant_type=password&client_id=LibertyRocks&client_secret=AndMakesConfigurationEasy&username=admin&password=admin' "https://192.168.99.100:9443/oauth2/endpoint/DemoProvider/token"
我收到错误
{
"error_description": "CWWKS1406E: The token request had an invalid client credential. The request URI was /oauth2/endpoint/DemoProvider/token.",
"error": "invalid_client"
}
但根据我的 server.xml 这应该是正确的。我错过了什么?
您能为该调用打开并提供服务器跟踪吗?该消息表示在请求中未找到凭据,或者已找到凭据但对该客户端无效。了解这里的情况会很有用。
您可以通过将此代码段添加到您的 server.xml:
来启用跟踪<logging traceSpecification="*=info=enabled:com.ibm.ws.security.*=all=enabled:com.ibm.oauth.*=all=enabled" />
第二天就成功了,不知道为什么。