java.lang.Object
java.lang.Record
com.irurueta.authserver.authorization.infrastructure.persistence.password.UserAccountRow
Record Components:
id - identifier of the user.
username - name the user signs in with.
password - encoded password.
enabled - whether the account is enabled.
email - e-mail address, or null when the user has none.
emailVerified - whether the e-mail address was verified.
tenant - tenant the user belongs to.

public record UserAccountRow(UUID id, String username, String password, boolean enabled, String email, boolean emailVerified, String tenant) extends Record
Columns of a user row joined with its encoded password, before the authorities, which live in a table of their own, are loaded.
  • Field Details

    • id

      private final UUID id
      The field for the id record component.
    • username

      private final String username
      The field for the username record component.
    • password

      private final String password
      The field for the password record component.
    • enabled

      private final boolean enabled
      The field for the enabled record component.
    • email

      private final String email
      The field for the email record component.
    • emailVerified

      private final boolean emailVerified
      The field for the emailVerified record component.
    • tenant

      private final String tenant
      The field for the tenant record component.
  • Constructor Details

    • UserAccountRow

      public UserAccountRow(UUID id, String username, String password, boolean enabled, String email, boolean emailVerified, String tenant)
      Creates an instance of a UserAccountRow record class.
      Parameters:
      id - the value for the id record component
      username - the value for the username record component
      password - the value for the password record component
      enabled - the value for the enabled record component
      email - the value for the email record component
      emailVerified - the value for the emailVerified record component
      tenant - the value for the tenant record component
  • Method Details

    • toUserAccount

      public UserAccount toUserAccount(List<String> authorities)
      Completes the row into an account.
      Parameters:
      authorities - authorities of the user, loaded separately.
      Returns:
      the account.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • id

      public UUID id()
      Returns the value of the id record component.
      Returns:
      the value of the id record component
    • username

      public String username()
      Returns the value of the username record component.
      Returns:
      the value of the username record component
    • password

      public String password()
      Returns the value of the password record component.
      Returns:
      the value of the password record component
    • enabled

      public boolean enabled()
      Returns the value of the enabled record component.
      Returns:
      the value of the enabled record component
    • email

      public String email()
      Returns the value of the email record component.
      Returns:
      the value of the email record component
    • emailVerified

      public boolean emailVerified()
      Returns the value of the emailVerified record component.
      Returns:
      the value of the emailVerified record component
    • tenant

      public String tenant()
      Returns the value of the tenant record component.
      Returns:
      the value of the tenant record component