Class MessageReplaySecurityHandler
java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.messaging.handler.AbstractMessageHandler
org.opensaml.saml.common.binding.security.impl.MessageReplaySecurityHandler
- All Implemented Interfaces:
Component,DestructableComponent,InitializableComponent,MessageHandler
Security message handler implementation that which checks for replay of SAML messages.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate DurationTime to expire cache entries.private final org.slf4j.LoggerLogger.private ReplayCacheMessage replay cache instance to use.private booleanWhether this rule is required to be met. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidprotected voiddoInvoke(MessageContext messageContext) Performs the handler logic.Gets the lifetime of replay entries.Get the replay cache instance to use.voidsetExpires(Duration exp) Sets the lifetime of replay entries.voidsetReplayCache(ReplayCache cache) Set the replay cache instance to use.voidsetRequiredRule(boolean flag) Set 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, 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. -
replayCache
Message replay cache instance to use. -
requiredRule
private boolean requiredRuleWhether this rule is required to be met. -
expires
Time to expire cache entries. Default value: (3 minutes)
-
-
Constructor Details
-
MessageReplaySecurityHandler
public MessageReplaySecurityHandler()Constructor.
-
-
Method Details
-
getReplayCache
Get the replay cache instance to use.- Returns:
- Returns the replayCache.
-
setReplayCache
Set the replay cache instance to use.- Parameters:
cache- The replayCache to set.
-
setRequiredRule
public void setRequiredRule(boolean flag) Set whether this rule is required to be met.- Parameters:
flag- flag to set
-
getExpires
Gets the lifetime of replay entries.- Returns:
- lifetime of entries
-
setExpires
Sets the lifetime of replay entries.- Parameters:
exp- lifetime of entries
-
doInitialize
- Overrides:
doInitializein classAbstractInitializableComponent- Throws:
ComponentInitializationException
-
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
-