Class ValidateValidUntilStage

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent
net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent
All Implemented Interfaces:
Stage<Element>, net.shibboleth.shared.component.Component, net.shibboleth.shared.component.DestructableComponent, net.shibboleth.shared.component.IdentifiableComponent, net.shibboleth.shared.component.IdentifiedComponent, net.shibboleth.shared.component.InitializableComponent

@ThreadSafe public class ValidateValidUntilStage extends AbstractIteratingStage<Element>
Checks that a SAML EntitiesDescriptor or EntityDescriptor's validUntil is (optionally) present and is within a given range. Items which are not a SAML EntitiesDescriptor or EntityDescriptor are ignored.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Duration
    Interval from now within which the validUntil date must fall.
    private boolean
    Whether the item is required to have a validUntil attribute.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    protected void
    Processes a given Item.
    final Duration
    Gets the interval from now within which the validUntil date must fall.
    final boolean
    Gets whether the item is required to have a validUntil attribute.
    void
    Sets the interval from now within which the validUntil date must fall.
    void
    setRequireValidUntil(boolean isRequired)
    Sets whether the item is required to have a validUntil attribute.

    Methods inherited from class net.shibboleth.metadata.pipeline.AbstractIteratingStage

    doExecute

    Methods inherited from class net.shibboleth.metadata.pipeline.AbstractStage

    execute, getCollectionPredicate, setCollectionPredicate

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiableInitializableComponent

    setId

    Methods inherited from class net.shibboleth.shared.component.AbstractIdentifiedInitializableComponent

    doInitialize, ensureId, getId, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException

    Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

    checkComponentActive, checkSetterPreconditions, destroy, doDestroy, initialize, isDestroyed, isInitialized

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.shibboleth.shared.component.DestructableComponent

    destroy, isDestroyed

    Methods inherited from interface net.shibboleth.shared.component.IdentifiedComponent

    getId

    Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

    initialize, isInitialized
  • Field Details

    • requireValidUntil

      private boolean requireValidUntil
      Whether the item is required to have a validUntil attribute. Default value: true
    • maxValidityInterval

      @Nonnull private Duration maxValidityInterval
      Interval from now within which the validUntil date must fall. A value of 0 indicates that no maximum interval is checked. Default value: 1 week
  • Constructor Details

    • ValidateValidUntilStage

      public ValidateValidUntilStage()
      Constructor.
  • Method Details

    • isRequireValidUntil

      public final boolean isRequireValidUntil()
      Gets whether the item is required to have a validUntil attribute.
      Returns:
      whether the item is required to have a validUntil attribute
    • setRequireValidUntil

      public void setRequireValidUntil(boolean isRequired)
      Sets whether the item is required to have a validUntil attribute.
      Parameters:
      isRequired - whether the item is required to have a validUntil attribute
    • getMaxValidityInterval

      @Nonnull public final Duration getMaxValidityInterval()
      Gets the interval from now within which the validUntil date must fall.
      Returns:
      Interval from now within which the validUntil date must fall
    • setMaxValidityInterval

      public void setMaxValidityInterval(@Nonnull Duration interval)
      Sets the interval from now within which the validUntil date must fall. A value of 0 indicates that there is no check on the upper bound of the validity period.
      Parameters:
      interval - interval from now within which the validUntil date must fall; must be greater than or equal to 0
    • doExecute

      protected void doExecute(@Nonnull Item<Element> item) throws StageProcessingException
      Description copied from class: AbstractIteratingStage
      Processes a given Item.
      Specified by:
      doExecute in class AbstractIteratingStage<Element>
      Parameters:
      item - Item on which to operate
      Throws:
      StageProcessingException - thrown if there is a problem with the stage processing