繁体   English   中英

IdentityServer3通过请求后的用户名和密码获取用户令牌

[英]IdentityServer3 get user token by username and password post REQUEST

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

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

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

所以答案是肯定的。

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

暂无
暂无

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

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