Record Class TokenResponse
java.lang.Object
java.lang.Record
com.loomcache.springboot.security.TokenResponse
-
Constructor Summary
ConstructorsConstructorDescriptionTokenResponse(String accessToken, String tokenType, long expiresIn, Instant expiresAt) Creates an instance of aTokenResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.Returns the value of theexpiresAtrecord component.longReturns the value of theexpiresInrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thetokenTyperecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
TokenResponse
Creates an instance of aTokenResponserecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componenttokenType- the value for thetokenTyperecord componentexpiresIn- the value for theexpiresInrecord componentexpiresAt- the value for theexpiresAtrecord 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. -
accessToken
Returns the value of theaccessTokenrecord component.- Returns:
- the value of the
accessTokenrecord component
-
tokenType
Returns the value of thetokenTyperecord component.- Returns:
- the value of the
tokenTyperecord component
-
expiresIn
public long expiresIn()Returns the value of theexpiresInrecord component.- Returns:
- the value of the
expiresInrecord component
-
expiresAt
Returns the value of theexpiresAtrecord component.- Returns:
- the value of the
expiresAtrecord component
-