1.資源所有者密碼憑證基本概念
2.建立一個wpf用戶端
3.Identity配置
4.WpfClient配置
5.運作
資源所有者密碼憑證(Resource Owner Password Credentials)
資源所有者密碼憑證(例如使用者名和密碼)直接被用來請求Access Token
通常用于遺留的憑證
資源所有者和用戶端應用之間必須高度信任
其它授權方式不可用的時候才使用,盡量不用
1.1請求格式
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 1.2響應格式
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 1.3請求流程
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials)
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 2.1MainWindow源碼
UI
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials)
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) View Code
背景
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials)
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 在Idp項目中進行配置
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 3.1IdentityResources配置
找到Config.cs
這裡為了可以更多的通路Identity資源,把email phone address 都配置上
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 3.2Clients配置
這裡也需要配置Identity資源
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 3.3檢視測試使用者(AddTestUsers)
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials) 用戶端需要配置使用者名密碼以及需要通路的Identity資源
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials)
IdentityServer4 資源所有者密碼憑證(Resource Owner Password Credentials)