无法在身份服务器中签名外部身份提供商



我有一个使用IdentityServer4的MVC应用程序。在IdentityServer4中,我注册了SAML2(Sustainsys.SAML2(为外部登录提供商。登录工作正常。

当用户从MVC应用程序中注销时,它会从MVC应用程序中登录,但登录外部登录提供程序的注销不会触发。我检查了我的身份服务器的注销方法,该方法将重定向到外部身份验证方案。但是重定向没有发生。

  this triggers a redirect to the external provider for sign-out
    return SignOut(new AuthenticationProperties { RedirectUri = url }, 
    vm.ExternalAuthenticationScheme);

这是I在I注册的SAML外部身份提供商中的代码。我已经使用了Sustainsys Saml的Nuget软件包。

.AddSaml2(options =>
{
    options.SignInScheme = IdentityServerConstants.ExternalCookieAuthenticationScheme;
    options.SignOutScheme = IdentityServerConstants.SignoutScheme;
    options.SPOptions = CreateSPOptions();
    var idp = new IdentityProvider(new EntityId(_strIDPEntityId), options.SPOptions)
    {
        AllowUnsolicitedAuthnResponse = true,
        Binding = Saml2BindingType.HttpRedirect,
        SingleSignOnServiceUrl = new Uri(_strSingleSignOnURL),
        SingleLogoutServiceBinding = Saml2BindingType.HttpRedirect,
        SingleLogoutServiceUrl = new Uri("https://devit-dev.onelogin.com/trust/saml2/http-redirect/slo/1111")
    };
    idp.SigningKeys.AddConfiguredKey(
    new X509Certificate2(
        AppDomain.CurrentDomain.SetupInformation.ApplicationBase + "../../../App_Data/OneLogin.cer"));
    options.IdentityProviders.Add(idp);
});   

不确定我在这里缺少什么。感谢任何帮助。

检查您的日志,它应该向您显示最终在本地注销中的决策过程。有很多事情需要有很多事情才能使联盟的注销工作。您需要服务证书,需要一些特别的索赔。后者将在未来与SustaMesys的兼容性发布中简化。SAML2/IDSRV4

相关内容

最新更新