简体   繁体   English

wso2 API 3.0-M24令牌API问题?

[英]wso2 apim 3.0-m24 token api issue?

I was using apim 3-m18 previously and post'ing to localhost:9443/api/auth/oauth2/v1.0/token?grant_type=password&scope=apim:api_view with the basic auth token of clientid:clientsecret returned from /api/id4entity/oauth2/dcr/v1.0/register endpoint worked fine in giving me the oauth token for admin api's - eg the logic laid out at wso2 API-M 3.0 - how to get oauth token for product/admin api calls 我之前使用的是apim 3-m18,并将其发布到localhost:9443 / api / auth / oauth2 / v1.0 / token?grant_type = password&scope = apim:api_view,具有从/ api /返回的clientid:clientsecret的基本身份验证令牌id4entity / oauth2 / dcr / v1.0 / register端点可以很好地为我提供管理api的oauth令牌-例如,在wso2 API-M 3.0列出的逻辑-如何获取用于产品/管理api调用的oauth令牌

However, I upgraded to latest rev (m24) and the dcr register endpoint still works fine, but when I then hit the token api with the base64-encoded clientid:clientsecret from dcr, the request hangs before i get a timeout error. 但是,我升级到了最新的版本(m24),并且dcr寄存器端点仍然可以正常工作,但是当我随后使用dcr中以base64编码的clientid:clientsecret来访问令牌api时,请求会挂起,直到收到超时错误。

When I exit m24 and restart m18 and make the exact same requests (dcr call for clientid/secret, then token api call), it works. 当我退出m24并重新启动m18并发出完全相同的请求(dcr调用clientid / secret,然后进行令牌api调用)时,它起作用了。 Then switching to m22 fails with same requests. 然后,切换到m22失败,并带有相同的请求。

I didn't see any documentation or issues in github on this, so was curious if anyone knows what I might need to change to get the oauth token. 我没有在github上看到任何文档或问题,因此很好奇是否有人知道我可能需要更改以获得oauth令牌。 Thanks. 谢谢。

Could you please use the following curl command 你能用下面的curl命令吗

curl -X POST -H "Authorization: Basic N2Y4MzM0ODEtNjk1ZS00OWY4LTg0OTgtOGU0NjUwNzhmYjljOmU1NmZlOTM3LTQwZjYtNGEwMy04MDIzLTE4ZGE0YmZmNWU3OA==" -H "Content-Type: application/x-www-form-urlencoded" -d 'username=admin&password=admin&grant_type=password&scope=scope' "https://localhost:9443/api/auth/oauth2/v1.0/token" -kv

Authorization token is Base64 encoded(clientId:clientSecret) 授权令牌是Base64编码的(clientId:clientSecret)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM