Class SAMLOutboundProtocolMessageSigningHandler

All Implemented Interfaces:
Component, DestructableComponent, InitializableComponent, MessageHandler

public class SAMLOutboundProtocolMessageSigningHandler
extends AbstractMessageHandler
A message handler implementation that signs an outbound SAML protocol message if the message context contains an instance of SignatureSigningParameters as determined by SAMLMessageSecuritySupport.getContextSigningParameters(MessageContext).
  • Field Details

    • log

      @Nonnull private final org.slf4j.Logger log
      Logger.
    • signErrorResponses

      private boolean signErrorResponses
      Whether to sign responses containing errors.
  • Constructor Details

    • SAMLOutboundProtocolMessageSigningHandler

      public SAMLOutboundProtocolMessageSigningHandler()
      Constructor.
  • Method Details

    • setSignErrorResponses

      public void setSignErrorResponses​(boolean flag)
      Set whether to sign response messages that contain errors (defaults to true).
      Parameters:
      flag - flag to set
    • doInvoke

      protected void doInvoke​(@Nonnull MessageContext messageContext) throws MessageHandlerException
      Performs the handler logic.
      Specified by:
      doInvoke in class AbstractMessageHandler
      Parameters:
      messageContext - the message context on which to invoke the handler
      Throws:
      MessageHandlerException - if there is an error invoking the handler on the message context
    • isErrorResponse

      private boolean isErrorResponse​(@Nullable Object message)
      Get whether the message is a SAML response containing an error status.
      Parameters:
      message - message to check
      Returns:
      true iff the message is a SAML response containing an error status