如何连接IDP启动的单次注销以运行自定义代码?

时间:2019-04-10 15:13:31

标签: sustainsys-saml2

我正在使用sustainsys.saml2.httpmodule。我想运行一些代码以从IDP启动的单次注销中注销。即使https://stubidp.sustainsys.com/Logout给我成功的结果,在IDP启动单次注销后,用户似乎也未注销(IsAuthenticated仍然为true)。

我似乎找不到其他需要相同功能或存在相同问题的人。我的Sustainsys配置如下。

<sustainsys.saml2 entityId="http://localhost:53758/Saml2"
                returnUrl="http://localhost:53758/Common/Pages/Saml2Login.aspx"
                authenticateRequestSigningBehavior="IfIdpWantAuthnRequestsSigned"
                validateCertificates="false"
                publicOrigin ="http://localhost:53758/">
    <nameIdPolicy allowCreate="false" format="Unspecified"/>
    <metadata cacheDuration="PT1440M" wantAssertionsSigned="true">
        <organization name="ab" displayName="ab" url="https://www.example.com/" language="en" />
        <contactPerson type="Technical" email="a@b.com" />
        <requestedAttributes>
            <add friendlyName ="Some Name" name="urn:someName" nameFormat="urn:oasis:names:tc:SAML:2.0:attrname-format:uri" isRequired="true" />
        </requestedAttributes>
    </metadata>
    <identityProviders>
    <add entityId="https://stubidp.sustainsys.com/Metadata"
        signOnUrl="https://stubidp.sustainsys.com"
        logoutUrl="https://stubidp.sustainsys.com/Logout"
        allowUnsolicitedAuthnResponse="true"
        binding="HttpRedirect"
        wantAuthnRequestsSigned="true">
        <signingCertificate storeName="CertificateAuthority" storeLocation="CurrentUser"
                        findValue="cdf7090a433561a843b51198b0ba6456" x509FindType="FindBySerialNumber" />
    </add>
    </identityProviders>
    <serviceCertificates>
        <add storeName="CertificateAuthority" storeLocation="CurrentUser" findValue="2cfe21cb930c19a341e9e30a07a3c123" x509FindType="FindBySerialNumber" />
    </serviceCertificates>
</sustainsys.saml2>

1 个答案:

答案 0 :(得分:0)

您可以使用LogoutCommandResultCreated通知。在将要重定向到Idp时以及从Idp收到响应之后,都会调用它。