Class SAMLOutboundProtocolMessageSigningHandler

  • All Implemented Interfaces:
    net.shibboleth.utilities.java.support.component.Component, net.shibboleth.utilities.java.support.component.DestructableComponent, net.shibboleth.utilities.java.support.component.InitializableComponent, org.opensaml.messaging.handler.MessageHandler

    public class SAMLOutboundProtocolMessageSigningHandler
    extends org.opensaml.messaging.handler.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 Summary

      Fields 
      Modifier and Type Field Description
      private org.slf4j.Logger log
      Logger.
      private boolean signErrorResponses
      Whether to sign responses containing errors.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected void doInvoke​(org.opensaml.messaging.context.MessageContext messageContext)
      private boolean isErrorResponse​(Object message)
      Get whether the message is a SAML response containing an error status.
      void setSignErrorResponses​(boolean flag)
      Set whether to sign response messages that contain errors (defaults to true).
      • Methods inherited from class org.opensaml.messaging.handler.AbstractMessageHandler

        doPostInvoke, doPostInvoke, doPreInvoke, getActivationCondition, getLogPrefix, invoke, setActivationCondition
      • Methods inherited from class net.shibboleth.utilities.java.support.component.AbstractInitializableComponent

        destroy, doDestroy, doInitialize, initialize, isDestroyed, isInitialized
      • Methods inherited from interface net.shibboleth.utilities.java.support.component.InitializableComponent

        initialize, isInitialized
    • Field Detail

      • log

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

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

      • SAMLOutboundProtocolMessageSigningHandler

        public SAMLOutboundProtocolMessageSigningHandler()
        Constructor.
    • Method Detail

      • 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
                                org.opensaml.messaging.context.MessageContext messageContext)
                         throws org.opensaml.messaging.handler.MessageHandlerException
        Specified by:
        doInvoke in class org.opensaml.messaging.handler.AbstractMessageHandler
        Throws:
        org.opensaml.messaging.handler.MessageHandlerException
      • 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