如何为Stormpath生成OAuth2.0令牌

huangapple go评论85阅读模式
英文:

How to generate Oauth2.0 token for Stormpath

问题

有人可以帮我生成Stormpath的访问令牌吗?
我正在按照Stormpath API文档中提到的步骤进行操作,但是遇到了404错误代码(请求的资源不存在)。

我正在使用端点(http://api.stormpath.com/v1/oauth/token?grant_type=client_credentials)获取令牌,并按照API文档中提到的方式传递所有的头部值。有人之前使用过吗?

英文:

Can someone help me in generating a access-token for Stormpath.
I'm following the steps mentioned storms api doc.But stuck with error code 404(The requested resource does not exist).

I'm using end point (http://api.stormpath.com/v1/oauth/token?grant_type=client_credentials) to get the tokens and passing all HEADER values as mentioned in API document. Have some used it before ?

答案1

得分: 2

我在Stormpath工作,可以帮助你解决这个问题。

答案是你需要在服务器上使用我们的SDK之一。目前我们不支持直接从API创建令牌。相反,你需要使用我们的SDK在服务器上公开此功能。SDK将与你的Stormpath应用程序一起工作,创建令牌并从服务器上提供它们。

文档的这一部分提供了示例:

http://docs.stormpath.com/guides/api-key-management/#using-the-stormpath-sdk-to-authenticate-and-generate-tokens-for-your-api-keys

希望对你有所帮助!

英文:

I work at Stormpath and can help you with this.

The answer is that you need to use one of our SDKs on your server. At this time we don't support token creation directly from our API. Instead you will need to expose this functionality on your server by using one of our SDKs. The SDK will work with your Stormpath Application to create the tokens and serve them from your serve.

This section of the documentation has examples:

http://docs.stormpath.com/guides/api-key-management/#using-the-stormpath-sdk-to-authenticate-and-generate-tokens-for-your-api-keys

Hope this helps!

huangapple
  • 本文由 发表于 2015年2月26日 20:18:09
  • 转载请务必保留本文链接:https://go.coder-hub.com/28742279.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定