Class MessageLifetimeSecurityHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.common.binding.security.impl.MessageLifetimeSecurityHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
Security message handler implementation that checks for validity of SAML message issue instant date and time.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DurationClock skew adjustment in both directions to consider still acceptable (Default value: 3 minutes).private final org.slf4j.LoggerClass logger.private DurationAmount of time for which a message is valid after it is issued (Default value: 3 minutes).private booleanWhether this rule is required to be met. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddoInvoke(MessageContext messageContext) Performs the handler logic.Get the clock skew.Gets the amount of time for which a message is valid.booleanGets whether this rule is required to be met.voidsetClockSkew(Duration skew) Set the clock skew.voidsetMessageLifetime(Duration lifetime) Sets the amount of time for which a message is valid.voidsetRequiredRule(boolean required) Sets whether this rule is required to be met.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 logClass logger. -
clockSkew
Clock skew adjustment in both directions to consider still acceptable (Default value: 3 minutes). -
messageLifetime
Amount of time for which a message is valid after it is issued (Default value: 3 minutes). -
requiredRule
private boolean requiredRuleWhether this rule is required to be met.
-
-
Constructor Details
-
MessageLifetimeSecurityHandler
public MessageLifetimeSecurityHandler()Constructor.
-
-
Method Details
-
getClockSkew
Get the clock skew.- Returns:
- the clock skew
-
setClockSkew
Set the clock skew.- Parameters:
skew- clock skew to set
-
getMessageLifetime
Gets the amount of time for which a message is valid.- Returns:
- amount of time for which a message is valid
-
setMessageLifetime
Sets the amount of time for which a message is valid.- Parameters:
lifetime- amount of time for which a message is valid
-
isRequiredRule
public boolean isRequiredRule()Gets whether this rule is required to be met.- Returns:
- whether this rule is required to be met
-
setRequiredRule
public void setRequiredRule(boolean required) Sets whether this rule is required to be met.- Parameters:
required- whether this rule is required to be met
-
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
-