2015-06-28 31 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

相關問題