2
任何想法如何建立Identityserver之間的信任關係? (類似於ADFS信任配置)?我的情況是這樣的:在IdentityServers之間建立信任關係
例如:
- App1的信任Idsvr1
- 應用2信任idsvr2
應用1,使請求以APP1令牌APP2。但App2不理解App1令牌(因爲它是由idsvr1發佈的)。所以App2將App1請求重定向到Idsvr2。現在Idsvr2看到由Idsvr1發佈的令牌,並且由於Idsvr2信任Idsvr1,Idsvr2通過包含來自idsvr1令牌的聲明並重新發送請求到App2來重新發布其令牌。現在,由於App2擁有來自其可信IdentityServer的令牌,它將接受該令牌並提供請求。
所以這需要在IdentityServers之間建立信任關係。
所以,如果我下面的代碼添加到Idsvr2 startup.cs文件ConfigureIdentityProviders方法,上述我的方案是否行得通呢? '代碼' 變種idsrvOptions =新IdentityServerOptions { SITENAME = 「https://開頭MYSERVER/idsvr2」, SigningCertificate = Cert.Load(), AuthenticationOptions =新AuthenticationOptions { IdentityProviders = ConfigureIdentityProviders } }; app.UseIdentityServer(idsrvOptions); –
檢查我們在github上的示例。 –
@BrockAllen,你能指點我說的那個特定的樣本嗎?我找不到任何樣本是在2個IdentityServer之間建立信任配置。 – CesarD