| Constructor | Description |
|---|---|
IssueTimeValidator() |
New instance with default values (allowed time skew 5 seconds, optional).
|
IssueTimeValidator(java.time.Instant now,
int allowedTimeSkew,
java.time.temporal.TemporalUnit allowedTimeSkewUnit,
boolean mandatory) |
New instance with explicit values.
|
| Modifier and Type | Method | Description |
|---|---|---|
void |
validate(Jwt token,
Errors.Collector collector) |
Validate the object against this class's configuration.
|
public IssueTimeValidator()
public IssueTimeValidator(java.time.Instant now,
int allowedTimeSkew,
java.time.temporal.TemporalUnit allowedTimeSkewUnit,
boolean mandatory)
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 as ChronoUnit.SECONDSmandatory - true for mandatory, false for optionalpublic void validate(Jwt token, Errors.Collector collector)
Validatorvalidate in interface Validator<Jwt>token - object to validatecollector - collector of error messages to add problems to. Use Errors.Collector.fatal(Object, String)
to mark the validation as a failureCopyright © 2018, Oracle and/or its affiliates. All Rights Reserved. Use is subject to license terms.