public class RequiredValidUntilFilter extends Object implements MetadataFilter
validUntil
attribute on the root element of the
metadata document. It can optionally enforce that the validity period (now minus validUntil
date)
is not longer than a specified amount.
A maximum validity interval of less than 1 means that no restriction is placed on the metadata's
validUntil
attribute.Modifier and Type | Field and Description |
---|---|
private org.slf4j.Logger |
log
Class logger.
|
private long |
maxValidityInterval
The maximum interval, in milliseconds, between now and the
validUntil date. |
Constructor and Description |
---|
RequiredValidUntilFilter()
Constructor.
|
RequiredValidUntilFilter(long maxValidity)
Constructor.
|
Modifier and Type | Method and Description |
---|---|
org.opensaml.core.xml.XMLObject |
filter(org.opensaml.core.xml.XMLObject metadata) |
long |
getMaxValidityInterval()
Get the maximum interval, in milliseconds, between now and the
validUntil date. |
protected org.joda.time.DateTime |
getValidUntil(org.opensaml.core.xml.XMLObject metadata)
Gets the validUntil time of the metadata, if present.
|
void |
setMaxValidityInterval(long validity)
Set the maximum interval, in milliseconds, between now and the
validUntil date. |
@Nonnull private final org.slf4j.Logger log
@Duration private long maxValidityInterval
validUntil
date.public RequiredValidUntilFilter()
public RequiredValidUntilFilter(long maxValidity)
maxValidity
- maximum interval, in seconds, between now and the validUntil
date@Duration public long getMaxValidityInterval()
validUntil
date.
A value of less than 1 indicates that there is no restriction.validUntil
date@Duration public void setMaxValidityInterval(@Duration long validity)
validUntil
date.
A value of less than 1 indicates that there is no restriction.validity
- time in milliseconds between now and the validUntil
date@Nullable public org.opensaml.core.xml.XMLObject filter(@Nullable org.opensaml.core.xml.XMLObject metadata) throws FilterException
filter
in interface MetadataFilter
FilterException
@Nullable protected org.joda.time.DateTime getValidUntil(@Nonnull org.opensaml.core.xml.XMLObject metadata) throws FilterException
metadata
- metadata from which to get the validUntil instantFilterException
- thrown if the given XML object is not an EntitiesDescriptor
or
EntityDescriptor
Copyright © 1999–2020 Shibboleth Consortium. All rights reserved.