Class SAML2LogoutValidator

java.lang.Object
org.pac4j.saml.profile.impl.AbstractSAML2ResponseValidator
org.pac4j.saml.logout.impl.SAML2LogoutValidator
All Implemented Interfaces:
SAML2ResponseValidator

public class SAML2LogoutValidator extends AbstractSAML2ResponseValidator
Validator for SAML logout requests/responses from the IdP.
Since:
2.0.0
Author:
Matthieu Taggiasco, Jerome Leleu
  • Constructor Details

    • SAML2LogoutValidator

      public SAML2LogoutValidator(SAML2SignatureTrustEngineProvider engine, org.opensaml.saml.saml2.encryption.Decrypter decrypter, org.pac4j.core.logout.handler.SessionLogoutHandler logoutHandler, ReplayCacheProvider replayCache, net.shibboleth.shared.net.URIComparator uriComparator)

      Constructor for SAML2LogoutValidator.

      Parameters:
      engine - a SAML2SignatureTrustEngineProvider object
      decrypter - a Decrypter object
      logoutHandler - a SessionLogoutHandler object
      replayCache - a ReplayCacheProvider object
      uriComparator - a URIComparator object
  • Method Details

    • validate

      public org.pac4j.core.credentials.Credentials validate(SAML2MessageContext context)
      Validates the SAML protocol response and the SAML SSO response. The method decrypt encrypted assertions if any. Validates the SAML protocol logout request/response.
      Parameters:
      context - the context
      Returns:
      the SAML credentials
    • validateLogoutRequest

      protected void validateLogoutRequest(org.opensaml.saml.saml2.core.LogoutRequest logoutRequest, SAML2MessageContext context, org.opensaml.xmlsec.signature.support.SignatureTrustEngine engine)
      Validates the SAML logout request.
      Parameters:
      logoutRequest - the logout request
      context - the context
      engine - the signature engine
    • validateLogoutResponse

      protected void validateLogoutResponse(org.opensaml.saml.saml2.core.LogoutResponse logoutResponse, SAML2MessageContext context, org.opensaml.xmlsec.signature.support.SignatureTrustEngine engine)
      Validates the SAML logout response.
      Parameters:
      logoutResponse - the logout response
      context - the context
      engine - the signature engine
    • validateDestinationEndpoint

      protected void validateDestinationEndpoint(org.opensaml.saml.saml2.core.StatusResponseType logoutResponse, SAML2MessageContext context)

      validateDestinationEndpoint.

      Parameters:
      logoutResponse - a LogoutResponse object
      context - a SAML2MessageContext object
    • validateSuccess

      protected void validateSuccess(org.opensaml.saml.saml2.core.Status status)
      Validates that the response is a success.
      Overrides:
      validateSuccess in class AbstractSAML2ResponseValidator
      Parameters:
      status - the response status.