【发布时间】:2020-09-22 07:55:35
【问题描述】:
我正在关注SAML 2.0 Integration with IdentityServer4 并实施“IdentityServer 4 作为 SAML 服务提供商”。
我还阅读了Automatic Metadata Lookup 并配置了我的启动,如下所示
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;
});
我正在使用外部提供商之一作为 SAML2P 获得 IdendityServer 登录屏幕,但是当我单击它时,它会重定向到 https://localhost:44380/External/Challenge?provider=saml2p&returnUrl=%2Fgrants,并且我可以看到一个空白页面。当我检查 IdentityServer 日志时,它显示“System.InvalidOperationException: IDX20803: Unable to obtain configuration from: 'https://degreed.com/saml/idp/94'. ---> System.AggregateException: One or more values could not be parsed from the metadata document. See inner exceptions for details. (Unable to parse a value for SigningCertificate from the metadata document) ---> IdentityServer4.Saml.Exceptions.SamlXmlParsingException: Unable to parse a value for SigningCertificate from the metadata document”
【问题讨论】:
标签: asp.net-core identityserver4 saml-2.0 asp.net-core-2.2