Class MaxTokenAgeValidator.Builder

java.lang.Object
io.helidon.security.jwt.MaxTokenAgeValidator.Builder
All Implemented Interfaces:
Builder<io.helidon.security.jwt.CommonValidator.BaseBuilder<MaxTokenAgeValidator.Builder,MaxTokenAgeValidator>,MaxTokenAgeValidator>, Supplier<MaxTokenAgeValidator>
Enclosing class:
MaxTokenAgeValidator

public static final class MaxTokenAgeValidator.Builder extends Object
Builder of the MaxTokenAgeValidator.
  • Method Details

    • build

      public MaxTokenAgeValidator build()
      Description copied from interface: Builder
      Build the instance from this builder.
      Returns:
      instance of the built type
    • expectedMaxTokenAge

      public MaxTokenAgeValidator.Builder expectedMaxTokenAge(Duration expectedMaxTokenAge)
      Expected max token age.
      Parameters:
      expectedMaxTokenAge - max token age
      Returns:
      updated builder instance
    • now

      Specific "current" time to validate time claim against. If not set, Instant.now() is used for every validation again.
      Parameters:
      now - specific current time
      Returns:
      updated builder instance
    • allowedTimeSkew

      public MaxTokenAgeValidator.Builder allowedTimeSkew(Duration allowedTimeSkew)
      Allowed time skew for time validation. The default value is 5 seconds.
      Parameters:
      allowedTimeSkew - allowed time skew
      Returns:
      updated builder instance
    • mandatory

      public MaxTokenAgeValidator.Builder mandatory(boolean mandatory)
      Whether handled claim is mandatory to be present. Default value is false.
      Parameters:
      mandatory - mandatory to be present
      Returns:
      updated builder instance
    • missingClaimMessage

      public MaxTokenAgeValidator.Builder missingClaimMessage(String missingClaimMessage)
      Custom missing claim error message.
      Parameters:
      missingClaimMessage - missing claim error message
      Returns:
      updated builder instance
    • me