Package org.flasby.login2.auth
Record Class JwtState
java.lang.Object
java.lang.Record
org.flasby.login2.auth.JwtState
- All Implemented Interfaces:
Serializable
public record JwtState(String decodedLoginID, Set<Role> roles, Boolean isLoggedIn, Instant expiresAt)
extends Record
implements Serializable
- See Also:
-
Nested Class Summary
Nested Classes -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thedecodedLoginID
record component.final boolean
Indicates whether some other object is "equal to" this one.Returns the value of theexpiresAt
record component.long
final int
hashCode()
Returns a hash code value for this object.Returns the value of theisLoggedIn
record component.roles()
Returns the value of theroles
record component.toString()
Returns a string representation of this record class.
-
Constructor Details
-
JwtState
Creates an instance of aJwtState
record class.- Parameters:
decodedLoginID
- the value for thedecodedLoginID
record componentroles
- the value for theroles
record componentisLoggedIn
- the value for theisLoggedIn
record componentexpiresAt
- the value for theexpiresAt
record component
-
JwtState
public JwtState()
-
-
Method Details
-
roles
Returns the value of theroles
record component.- Returns:
- the value of the
roles
record component
-
expiresInSeconds
public long expiresInSeconds() -
getExpState
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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)
. -
decodedLoginID
Returns the value of thedecodedLoginID
record component.- Returns:
- the value of the
decodedLoginID
record component
-
isLoggedIn
Returns the value of theisLoggedIn
record component.- Returns:
- the value of the
isLoggedIn
record component
-
expiresAt
Returns the value of theexpiresAt
record component.- Returns:
- the value of the
expiresAt
record component
-