Record Class AuthResponse
java.lang.Object
java.lang.Record
com.example.security.auth.dto.AuthResponse
- Record Components:
accessToken- JWT de acceso firmadotokenType- esquema de autenticación,BearerexpiresIn- duración del token en segundosuser- perfil público de la cuenta
public record AuthResponse(String accessToken, String tokenType, long expiresIn, UserResponse user)
extends Record
Respuesta de un inicio de sesión o registro correcto.
-
Constructor Summary
ConstructorsConstructorDescriptionAuthResponse(String accessToken, String tokenType, long expiresIn, UserResponse user) Creates an instance of aAuthResponserecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theaccessTokenrecord component.final booleanIndicates whether some other object is "equal to" this one.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.user()Returns the value of theuserrecord component.
-
Constructor Details
-
AuthResponse
Creates an instance of aAuthResponserecord class.- Parameters:
accessToken- the value for theaccessTokenrecord componenttokenType- the value for thetokenTyperecord componentexpiresIn- the value for theexpiresInrecord componentuser- the value for theuserrecord 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
-
expiresIn
-
user
-