1

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

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 服务器并返回令牌。是否可以?

4

1 回答 1

2

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

于 2015-06-29T21:18:44.427 回答