java.lang.Object
io.helidon.security.jwt.Jwt.ExpirationValidator
- Enclosing class:
Jwt
@Deprecated(since="4.0.10",
forRemoval=true)
public static final class Jwt.ExpirationValidator
extends Object
implements Validator<Jwt>
Deprecated, for removal: This API element is subject to removal in a future version.
Validator of expiration claim.
-
Method Summary
Modifier and TypeMethodDescriptionstatic Jwt.ExpirationValidator
create()
Deprecated, for removal: This API element is subject to removal in a future version.New instance with default values (allowed time skew 5 seconds, optional).static Jwt.ExpirationValidator
create
(boolean mandatory) Deprecated, for removal: This API element is subject to removal in a future version.New instance with default values (allowed time skew 5 seconds).static Jwt.ExpirationValidator
create
(Instant now, int allowedTimeSkew, TemporalUnit allowedTimeSkewUnit, boolean mandatory) Deprecated, for removal: This API element is subject to removal in a future version.New instance with explicit values.void
validate
(Jwt token, Errors.Collector collector) Deprecated, for removal: This API element is subject to removal in a future version.Validate the object against this class's configuration.
-
Method Details
-
create
Deprecated, for removal: This API element is subject to removal in a future version.New instance with default values (allowed time skew 5 seconds, optional).- Returns:
- expiration time validator with defaults
-
create
Deprecated, for removal: This API element is subject to removal in a future version.New instance with default values (allowed time skew 5 seconds).- Parameters:
mandatory
- if this value is mandatory or not- Returns:
- expiration time validator with defaults
-
create
public static Jwt.ExpirationValidator create(Instant now, int allowedTimeSkew, TemporalUnit allowedTimeSkewUnit, boolean mandatory) Deprecated, for removal: This API element is subject to removal in a future version.New instance with explicit values.- Parameters:
now
- time to validate against (to be able to validate past tokens)allowedTimeSkew
- allowed time skew amount (such as 5)allowedTimeSkewUnit
- allowed time skew unit (such asChronoUnit.SECONDS
mandatory
- true for mandatory, false for optional- Returns:
- expiration time validator
-
validate
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:Validator
Validate the object against this class's configuration.- Specified by:
validate
in interfaceValidator<Jwt>
- Parameters:
token
- object to validatecollector
- collector of error messages to add problems to. UseErrors.Collector.fatal(Object, String)
to mark the validation as a failure
-
JwtValidator.Builder.addExpirationValidator()
instead