Package com.bank.auth_service.dto
Record Class AuthenticationTokenDto
java.lang.Object
java.lang.Record
com.bank.auth_service.dto.AuthenticationTokenDto
- Record Components:
token
- the JWT access tokenrefreshToken
- the refresh token used to renew the access token
DTO representing authentication tokens returned after a successful login.
Contains the access token (JWT) used for authorization and the refresh token used to obtain new access tokens.
- Since:
- 1.0.0
- Version:
- 1.0.0, 06/23/2025
- Author:
- Fernando Cruz Cavina
-
Constructor Summary
ConstructorsConstructorDescriptionAuthenticationTokenDto
(String token, String refreshToken) Creates an instance of aAuthenticationTokenDto
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.Returns the value of therefreshToken
record component.token()
Returns the value of thetoken
record component.final String
toString()
Returns a string representation of this record class.
-
Constructor Details
-
AuthenticationTokenDto
Creates an instance of aAuthenticationTokenDto
record class.- Parameters:
token
- the value for thetoken
record componentrefreshToken
- the value for therefreshToken
record component
-
-
Method Details
-
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)
. -
token
Returns the value of thetoken
record component.- Returns:
- the value of the
token
record component
-
refreshToken
Returns the value of therefreshToken
record component.- Returns:
- the value of the
refreshToken
record component
-