組成
IdentityServer,Api和Client(客戶端,asp .net core)
本文以官方demo:https://github.com/IdentityServer/IdentityServer4.Samples/tree/release/Quickstarts/6_AspNetIdentity 作為模板進行講解
流程

2
預設:IdentityServer配置各Api相關信息,Api配置IdentityServer相關信息
1.用戶訪問客戶端,客戶端發現用戶沒有登錄(授權)
2.根據客戶端設置的令牌發行者基本地址,訪問IdentityServer的網站
3.在IdentityServer的網站進行登錄,成功后獲得令牌,返回客戶端
4.訪問Api接口(有兩種方式:User Access Token和Client Credentials)
5.Api驗證令牌通過,返回結果