2015-06-28 32 views
1

我发现这个教程身份验证获取用户令牌并获得通过用户名和密码身份服务器令牌:IdentityServer3通过用户名和密码POST请求

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服务器并返回令牌。可能吗?

回答

2

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

https://tools.ietf.org/html/rfc6749#section-4.3

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

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

所以答案是肯定的。

编辑:修复了死的IdServer链接作为文档移动到docsv2

+0

嘿。感谢您的所有链接。现在它可以工作。 – senzacionale

相关问题