Asp.net core 使用Saml2p将SAML与IdentityServer 4集成

Asp.net core 使用Saml2p将SAML与IdentityServer 4集成,asp.net-core,identityserver4,saml-2.0,asp.net-core-2.2,Asp.net Core,Identityserver4,Saml 2.0,Asp.net Core 2.2,我正在遵循并实施“作为SAML服务提供商的IdentityServer 4” 我还阅读并配置了我的启动,如下所示 authenticationBuilder = authenticationBuilder.AddSaml2p("saml2p", options => { options.Licensee = "DEMO"; options.LicenseKey = "<<LICENSE_KEY>>"; opt

我正在遵循并实施“作为SAML服务提供商的IdentityServer 4”

我还阅读并配置了我的启动,如下所示

authenticationBuilder = authenticationBuilder.AddSaml2p("saml2p", options =>
    {

        options.Licensee = "DEMO";
        options.LicenseKey = "<<LICENSE_KEY>>";
        options.IdentityProviderMetadataAddress = "https://degreed.com/saml/idp/94";


        options.ServiceProviderOptions = new SpOptions
        {
            EntityId = "https://degreed.com/DegreedIdP/94",
            MetadataPath = "/saml/metadata",

            // optional
            //SignAuthenticationRequests = true,
            //SigningCertificate = new X509Certificate2(Convert.FromBase64String("<<SOME_STRING>>"))
        };

        options.CallbackPath = "/signin-idsrv";
        options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
    });
authenticationBuilder=authenticationBuilder.AddSaml2p(“saml2p”,选项=>
{
选项。被许可方=“演示”;
options.LicenseKey=“”;
options.IdentityProviderMetadataAddress=”https://degreed.com/saml/idp/94";
options.ServiceProviderOptions=新的SpOptions
{
EntityId=”https://degreed.com/DegreedIdP/94",
MetadataPath=“/saml/metadata”,
//可选的
//SignAuthenticationRequests=true,
//SigningCertificate=new X509Certificate2(转换为.FromBase64String(“”))
};
options.CallbackPath=“/signin idsrv”;
options.signnscheme=IdentityServerConstants.ExternalCookieAuthenticationScheme;
});

我得到了一个外部提供者为SAML2P的IdendityServer登录屏幕,但当我单击它时,它重定向到,我可以看到一个空白页面。当我签入IdentityServer日志时,它会显示“
System.InvalidOperationException:IDX20803:无法从以下位置获取配置:”https://degreed.com/saml/idp/94'.-->System.AggregateException:无法从元数据文档分析一个或多个值。有关详细信息,请参阅内部异常。(无法分析元数据文档中签名证书的值)--->IdentityServer4.Saml.Exceptions.SamlXmlParsingException:无法分析元数据文档中签名证书的值

第一个链接断开了吗

元数据是否有签名元素

尝试将“SignAuthenticationRequests”设置为“False”


当您按照第二篇文章手动输入元数据时会发生什么情况?

第一个链接已断开

元数据是否有签名元素

尝试将“SignAuthenticationRequests”设置为“False”

根据第二篇文章手动输入元数据时会发生什么情况