Class SAMLOutboundProtocolMessageSigningHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.common.binding.security.impl.SAMLOutboundProtocolMessageSigningHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
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
FieldsModifier and TypeFieldDescriptionprivate final org.slf4j.LoggerLogger.private booleanWhether to sign responses containing errors. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voiddoInvoke(MessageContext messageContext) Performs the handler logic.private booleanisErrorResponse(Object message) Get whether the message is a SAML response containing an error status.voidsetSignErrorResponses(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, isPreInvokeCalled, setActivationConditionMethods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent
checkComponentActive, checkSetterPreconditions, destroy, doDestroy, doInitialize, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitializedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.shibboleth.shared.component.InitializableComponent
initialize, isInitialized
-
Field Details
-
log
@Nonnull private final org.slf4j.Logger logLogger. -
signErrorResponses
private boolean signErrorResponsesWhether 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
Performs the handler logic.- Specified by:
doInvokein classAbstractMessageHandler- 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
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
-