Record Class RefreshToken
java.lang.Object
java.lang.Record
com.svenruppert.jsentinel.credential.propagation.RefreshToken
- All Implemented Interfaces:
TokenCredential
@ExperimentalJSentinelApi
public record RefreshToken(String value, Optional<Instant> expiresAt, Optional<String> audience, Optional<String> issuerHash)
extends Record
implements TokenCredential
Refresh token. Class-A secret — never forwarded by
PassThroughStrategy.- Since:
- 00.74.00
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaudience()Returns the value of theaudiencerecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of theissuerHashrecord component.toString()Returns a string representation of this record class.value()Returns the value of thevaluerecord component.
-
Constructor Details
-
RefreshToken
public RefreshToken(String value, Optional<Instant> expiresAt, Optional<String> audience, Optional<String> issuerHash) Creates an instance of aRefreshTokenrecord class.- Parameters:
value- the value for thevaluerecord componentexpiresAt- the value for theexpiresAtrecord componentaudience- the value for theaudiencerecord componentissuerHash- the value for theissuerHashrecord component
-
-
Method Details
-
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
Returns the value of thevaluerecord component.- Specified by:
valuein interfaceTokenCredential- Returns:
- the value of the
valuerecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Specified by:
expiresAtin interfaceTokenCredential- Returns:
- the value of the
expiresAtrecord component
-
audience
Returns the value of theaudiencerecord component.- Specified by:
audiencein interfaceTokenCredential- Returns:
- the value of the
audiencerecord component
-
issuerHash
Returns the value of theissuerHashrecord component.- Specified by:
issuerHashin interfaceTokenCredential- Returns:
- the value of the
issuerHashrecord component
-