我正在使用身份服务器4对我的ASP.Net Core解决方案进行身份验证 . 它与Facebook,谷歌和其他外部身份提供商合作良好 . 现在,我正在尝试使用来自https://github.com/Sustainsys/Saml2的Sustainsys.Saml2向身份服务器添加SAML 2.0身份验证,并使其作为外部身份提供者工作 . (我们网站的客户希望使用我们的身份服务器使用他们的SAML身份提供商登录,就像他们可以通过Facebook,Google等登录一样)
我现在拥有的是
-
登录网址 - https://sso.domain.com/saml/idp/profile/redirectorpost/sso
-
我们客户的基于SAML身份提供商的CRT证书 .
但是,我找不到描述如何在身份服务器4 startup.cs文件中设置SAML 2.0配置的文档 . 我认为配置应该基于以下示例:https://github.com/Sustainsys/Saml2/blob/master/Samples/SampleAspNetCore2ApplicationNETFramework/Startup.cs
services.AddAuthentication()
.AddSaml2(options =>
{
options.SPOptions.EntityId = new EntityId("...");
options.IdentityProviders.Add(
new IdentityProvider(
new EntityId("..."), options.SPOptions)
{
LoadMetadata = true,
});
options.SPOptions.ServiceCertificates.Add(new X509Certificate2("..."));
}
);
在示例中有两个url
这些是什么 represent ?
Can somebody tell me how to setup all the options for SAML2 in identity server 4?
1 回答
是应用程序的实体ID - 对应于open id connect中的客户端ID .
是上游idp的实体ID .
另一个分支中有一个示例IdSrv4:https://github.com/Sustainsys/Saml2/tree/netstandard/Samples/SampleIdentityServer4
该示例使用.NET Core的预览版本,但配置基本相同 .