【问题标题】:IdentityServer3 get user token by username and password post REQUESTIdentityServer3 通过用户名和密码发布请求获取用户令牌
【发布时间】:2015-09-15 05:21:32
【问题描述】:

我发现本教程通过用户名和密码从身份服务器进行身份验证和获取令牌:

http://leastprivilege.com/2013/11/13/embedding-a-simple-usernamepassword-authorization-server-in-web-api-v2/

https://identityserver.github.io/Documentation/docs/overview/simplestOAuth.html

https://github.com/IdentityModel/Thinktecture.IdentityModel/tree/e6cf193dbffbe1dc3a15848106807983ec503c22/samples/OAuth2/EmbeddedResourceOwnerFlow

到处都写着 url 是这样的:

&grant_type=password&username=aa&password=aa

我的问题是我是否也需要像示例中的 EmbeddedAuthorizationServer 或者我可以直接调用 SSO 服务器?

我想将用户名和密码发布到 SSO 服务器并返回令牌。有可能吗?

【问题讨论】:

    标签: c# thinktecture-ident-server thinktecture-ident-model


    【解决方案1】:

    IdentityServer3 支持所谓的资源所有者密码凭证流。

    https://www.rfc-editor.org/rfc/rfc6749#section-4.3

    https://identityserver.github.io/Documentation/docsv2/endpoints/token.html

    https://github.com/IdentityServer/IdentityServer3.Samples/tree/master/source/Clients/ConsoleResourceOwnerClient

    所以答案是肯定的。

    编辑:修复了文档移至 docsv2 时失效的 IdServer-Link

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2019-08-31
      • 2018-07-09
      • 1970-01-01
      • 2020-09-09
      • 2019-05-24
      • 1970-01-01
      • 2011-09-16
      相关资源
      最近更新 更多