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
    • signErrorResponses

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

    • SAMLOutboundProtocolMessageSigningHandler

      public SAMLOutboundProtocolMessageSigningHandler()
  • Method Details

    • setSignErrorResponses

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

      protected void doInvoke​(@Nonnull MessageContext messageContext) throws MessageHandlerException
      Performs the handler logic.
      Specified by:
      doInvoke in class AbstractMessageHandler
      messageContext - the message context on which to invoke the handler
      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.
      message - message to check
      true iff the message is a SAML response containing an error status