Record Class RefreshSessionStore.Rotation
java.lang.Object
java.lang.Record
io.leandev.appfuse.security.auth.RefreshSessionStore.Rotation
- Enclosing interface:
RefreshSessionStore
public static record RefreshSessionStore.Rotation(UUID sessionId, long expectedGeneration, String currentCredentialHash, String replacementCredentialHash, String replacementCredentialSelectorHash, Instant rotatedAt, Instant nextIdleExpiresAt)
extends Record
compare-and-rotate command。
expectedGeneration 與 currentCredentialHash 必須同時吻合。-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecurrentCredentialHashrecord component.final booleanIndicates whether some other object is "equal to" this one.longReturns the value of theexpectedGenerationrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thenextIdleExpiresAtrecord component.Returns the value of thereplacementCredentialHashrecord component.Returns the value of thereplacementCredentialSelectorHashrecord component.Returns the value of therotatedAtrecord component.Returns the value of thesessionIdrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Rotation
public Rotation(UUID sessionId, long expectedGeneration, String currentCredentialHash, String replacementCredentialHash, String replacementCredentialSelectorHash, Instant rotatedAt, Instant nextIdleExpiresAt) Creates an instance of aRotationrecord class.- Parameters:
sessionId- the value for thesessionIdrecord componentexpectedGeneration- the value for theexpectedGenerationrecord componentcurrentCredentialHash- the value for thecurrentCredentialHashrecord componentreplacementCredentialHash- the value for thereplacementCredentialHashrecord componentreplacementCredentialSelectorHash- the value for thereplacementCredentialSelectorHashrecord componentrotatedAt- the value for therotatedAtrecord componentnextIdleExpiresAt- the value for thenextIdleExpiresAtrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
sessionId
Returns the value of thesessionIdrecord component.- Returns:
- the value of the
sessionIdrecord component
-
expectedGeneration
public long expectedGeneration()Returns the value of theexpectedGenerationrecord component.- Returns:
- the value of the
expectedGenerationrecord component
-
currentCredentialHash
Returns the value of thecurrentCredentialHashrecord component.- Returns:
- the value of the
currentCredentialHashrecord component
-
replacementCredentialHash
Returns the value of thereplacementCredentialHashrecord component.- Returns:
- the value of the
replacementCredentialHashrecord component
-
replacementCredentialSelectorHash
Returns the value of thereplacementCredentialSelectorHashrecord component.- Returns:
- the value of the
replacementCredentialSelectorHashrecord component
-
rotatedAt
Returns the value of therotatedAtrecord component.- Returns:
- the value of the
rotatedAtrecord component
-
nextIdleExpiresAt
Returns the value of thenextIdleExpiresAtrecord component.- Returns:
- the value of the
nextIdleExpiresAtrecord component
-