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 aAuthenticationTokenDtorecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Returns the value of therefreshTokenrecord component.token()Returns the value of thetokenrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
AuthenticationTokenDto
Creates an instance of aAuthenticationTokenDtorecord class.- Parameters:
token- the value for thetokenrecord componentrefreshToken- the value for therefreshTokenrecord 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 thetokenrecord component.- Returns:
- the value of the
tokenrecord component
-
refreshToken
Returns the value of therefreshTokenrecord component.- Returns:
- the value of the
refreshTokenrecord component
-