Record Class RegisterRequest
java.lang.Object
java.lang.Record
com.example.security.auth.dto.RegisterRequest
- Record Components:
name- nombre visibleemail- correo de la nueva cuentapassword- contraseña que se codificará antes de guardarla
-
Constructor Summary
ConstructorsConstructorDescriptionRegisterRequest(@NotBlank @Size(min=2,max=80) String name, @NotBlank @Email @Size(max=160) String email, @NotBlank @Size(min=8,max=72) String password) Creates an instance of aRegisterRequestrecord class. -
Method Summary
Modifier and TypeMethodDescription@NotBlank @Email @Size(max=160) Stringemail()Returns the value of theemailrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.@AssertTrue(message="La contrase\u00f1a no puede superar 72 bytes UTF-8.") booleanComprueba el límite de BCrypt sobre los bytes UTF-8.@NotBlank @Size(min=2,max=80) Stringname()Returns the value of thenamerecord component.@NotBlank @Size(min=8,max=72) Stringpassword()Returns the value of thepasswordrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
RegisterRequest
public RegisterRequest(@NotBlank @Size(min=2,max=80) @NotBlank @Size(min=2,max=80) String name, @NotBlank @Email @Size(max=160) @NotBlank @Email @Size(max=160) String email, @NotBlank @Size(min=8,max=72) @NotBlank @Size(min=8,max=72) String password) Creates an instance of aRegisterRequestrecord class.
-
-
Method Details
-
isPasswordWithinBcryptLimit
@AssertTrue(message="La contrase\u00f1a no puede superar 72 bytes UTF-8.") public @AssertTrue(message="La contrase\u00f1a no puede superar 72 bytes UTF-8.") boolean isPasswordWithinBcryptLimit()Comprueba el límite de BCrypt sobre los bytes UTF-8. Un carácter puede ocupar varios bytes.- Returns:
- si la contraseña está ausente o tiene como máximo 72 bytes
-
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. All components in this record class are compared withObjects::equals(Object,Object). -
name
-
email
-
password
-