簡體   English   中英

SAML 2.0身份驗證請求到身份驗證

[英]SAML 2.0 authentication request to Identity Authentication

如何在ASP.NET MVC中生成對身份驗證的SAML 2.0身份驗證請求?

更新:我已經嘗試過Sustainsys.Saml2。 以下是webconfig文件的一部分。 當我嘗試登錄時,出現異常“系統找不到指定的文件。”。

<sustainsys.saml2 entityId="http://localhost:58917/Saml2" returnUrl="http://localhost:58917/">
    <identityProviders>
        <add entityId="~/App_Data/metadata.xml" signOnUrl="https://stubidp.sustainsys.com/" allowUnsolicitedAuthnResponse="true" binding="HttpRedirect">
            <signingCertificate fileName="~/App_Data/stubidp.sustainsys.com.cer"/>
        </add>
    </identityProviders>
    <!--<federations>
        <add metadataLocation="http://localhost:58917/Federation" allowUnsolicitedAuthnResponse="true"/>
    </federations>-->
    <!--<serviceCertificates>
        <add fileName="~/App_Data/Sustainsys.Saml2.Tests.pfx"/>
    </serviceCertificates>-->
</sustainsys.saml2>

您可以使用Sustainsys.Saml2,然后可以跟隨那里的MVC示例應用程序

MVC軟件包包含一個MVC控制器,只需在應用程序中安裝該軟件包即可在您的應用程序中對其進行訪問。 對於MVC應用程序,控制器比使用身份驗證模塊更為可取,因為它與MVC的錯誤處理集成在一起。

NuGet包使用方法: Sustainsys.Saml2.Mvc

請參閱配置以獲取有關如何配置web.config文件的信息。

更新:確保App_Data文件夾下的證書文件stubidp.sustainsys.com.cer

暫無
暫無

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

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