WebSphere Docker OAuth

我需要针对IBM WebSphere服务器实现OAuth。 为此,我根据http://www.ibm.com/developerworks/websphere/techjournal/1305_odonnell2/1305_odonnell2.htmlbuild立了docker环境https://github.com/hhoechtl/websphere-oauth

但是,如果我试图获得一个令牌

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应该是正确的。 我错过了什么?

你将能够打开并提供服务器追踪该调用? 该消息指示在请求中找不到任何凭证,或者find凭证,但对于该客户无效。 知道这里是什么情况是有用的。

您可以通过将此片段添加到server.xml来启用跟踪:

 <logging traceSpecification="*=info=enabled:com.ibm.ws.security.*=all=enabled:com.ibm.oauth.*=all=enabled" /> 

第二天它刚刚工作,不知道为什么。