Class AssertionReplayValidator
java.lang.Object
org.opensaml.saml.saml2.assertion.impl.AbstractAssertionIDReplayValidator
org.opensaml.saml.saml2.assertion.impl.AssertionReplayValidator
- All Implemented Interfaces:
AssertionValidator
public class AssertionReplayValidator
extends AbstractAssertionIDReplayValidator
implements AssertionValidator
An implementation of
AssertionValidator which checks for assertion replay/reuse.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected StringGet the cache context used with the replay cache.protected StringGet the optional validation context param name to use for the per-validation expirationvalidate(Assertion assertion, ValidationContext context) Validates the given assertion.Methods inherited from class org.opensaml.saml.saml2.assertion.impl.AbstractAssertionIDReplayValidator
doValidate, getCacheValue, getExpires, getReplayCacheExpires
-
Field Details
-
CACHE_CONTEXT
Cache context name.
-
-
Constructor Details
-
AssertionReplayValidator
Constructor.- Parameters:
replay- reply cache used to track which assertions have been usedexpires- time for disposal of tracked assertion from the replay cache. May be null, then defaults to 8 hours
-
-
Method Details
-
getCacheContext
Get the cache context used with the replay cache.- Specified by:
getCacheContextin classAbstractAssertionIDReplayValidator- Returns:
- the cache context
-
getExpirationParameterName
Get the optional validation context param name to use for the per-validation expirationThis is the name of the parameter in the supplied
ValidationContextwhich holds an optionalDurationvalue.- Specified by:
getExpirationParameterNamein classAbstractAssertionIDReplayValidator- Returns:
- param name, or null
-
validate
@Nonnull public ValidationResult validate(@Nonnull Assertion assertion, @Nonnull ValidationContext context) throws AssertionValidationException Validates the given assertion.- Specified by:
validatein interfaceAssertionValidator- Parameters:
assertion- assertion being evaluatedcontext- current Assertion validation context- Returns:
- the result of the evaluation
- Throws:
AssertionValidationException- if there is a problem processing the validation operation
-