[英]Thinktecture Identity Server HRD for two Client APP and different Return URL
我已經按照本文使用IdSrv2作為IP-STS與會員商店,並且可以在我的第一個客戶端應用程序中使用returnurl:abc.com/a.aspx在其中一個依賴方和資源中正常工作。
對於我的場景,我只想創建一個我創建的身份提供程序。 這是因為我不想顯示我在HRD頁面中創建的所有Idendity提供者只想顯示我的IDP以及來自社交網絡(facebook,google +等)的其他idnetity服務。
但是當我登錄到我的第二個客戶端應用程序時,我遇到它總是返回到abc.com/a.aspx。有沒有解決我問題的解決方案?
我創建了我認為你想要實現的設置。 所以我有Portal1和Portal2。 兩個門戶都設置為再次驗證用戶idsrv2(thinktecture identityserver)並設置為使用HRD。 Idsrv2設置為通過HRD將用戶的身份驗證委托給idsrv(thinktecture identityserver)。
Portal1 web.config的配置(只有重要的部分)是
<system.identityModel>
<identityConfiguration>
<audienceUris>
<add value="https://localhost/Portal1/" />
</audienceUris>
<issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry">
<authority name="http://idsrv2">
<keys>
<add thumbprint="BCD339ECD62BC50DEDA3B54D2236D12AE1217687" />
</keys>
<validIssuers>
<add name="http://idsrv2" />
</validIssuers>
</authority>
</issuerNameRegistry>
<!--certificationValidationMode set to "None" by the the Identity and Access Tool for Visual Studio. For development purposes.-->
<certificateValidation certificateValidationMode="None" />
</identityConfiguration>
</system.identityModel>
<system.identityModel.services>
<federationConfiguration>
<cookieHandler requireSsl="false" />
<wsFederation passiveRedirectEnabled="true" issuer="https://localhost/idsrv2/issue/hrd" realm="https://localhost/Portal1/" requireHttps="false" />
</federationConfiguration>
</system.identityModel.services>
Portal2的配置(僅限重要部分)是:
<system.identityModel>
<identityConfiguration>
<audienceUris>
<add value="https://localhost/Portal2/" />
</audienceUris>
<issuerNameRegistry type="System.IdentityModel.Tokens.ValidatingIssuerNameRegistry, System.IdentityModel.Tokens.ValidatingIssuerNameRegistry">
<authority name="http://idsrv2">
<keys>
<add thumbprint="BCD339ECD62BC50DEDA3B54D2236D12AE1217687" />
</keys>
<validIssuers>
<add name="http://idsrv2" />
</validIssuers>
</authority>
</issuerNameRegistry>
<!--certificationValidationMode set to "None" by the the Identity and Access Tool for Visual Studio. For development purposes.-->
<certificateValidation certificateValidationMode="None" />
</identityConfiguration>
</system.identityModel>
<system.identityModel.services>
<federationConfiguration>
<cookieHandler requireSsl="false" />
<wsFederation passiveRedirectEnabled="true" issuer="https://localhost/idsrv2/issue/hrd" realm="https://localhost/Portal2/" requireHttps="false" />
</federationConfiguration>
</system.identityModel.services>
現在,配置idsrv(我相信的部分很重要):
最后配置idsrv2:
在Portal1上進行身份驗證時,最后是網絡流量
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.