Record Class BootstrapToken
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.bootstrap.BootstrapToken
- Record Components:
value- the opaque token valuecreatedAt- the instant the token was generated, used to evaluate expiry against a configurable validity window
-
Constructor Summary
ConstructorsConstructorDescriptionBootstrapToken(String value, Instant createdAt) Defensive constructor — rejects null / blank values. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecreatedAtrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.booleanbooleanConstant-time comparison against a candidate string.final StringtoString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
BootstrapToken
-
-
Method Details
-
matches
Constant-time comparison against a candidate string. Safe against timing attacks.- Parameters:
candidate- the candidate token value to compare against this token- Returns:
trueif the candidate matches this token's value
-
isExpired
-
toString
-
hashCode
-
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared withObjects::equals(Object,Object). -
value
-
createdAt
-