簡體   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