簡體   English   中英

Thinktecture Identity Server HRD用於兩個客戶端APP和不同的返回URL

[英]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(我相信的部分很重要):

一般配置

關鍵配置

WSFederation協議配置

身份提供者

轉發方

最后配置idsrv2:

一般配置

關鍵配置

WSFederation協議配置

身份提供者

轉發方

用於Portal1配置的RP

用於Portal2配置的RP

在Portal1上進行身份驗證時,最后是網絡流量

網絡流量

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM