Class User

java.lang.Object
it.univr.passportease.entity.User
All Implemented Interfaces:
UserType

@Entity public class User extends Object implements UserType
The User class is an entity that represents a user, or costumers, of the application.
  • Field Details

    • id

      private UUID id
      The unique identifier of the User
    • fiscalCode

      @NonNull private @NonNull String fiscalCode
      The unique fiscal code of the User
    • email

      @NonNull private @NonNull String email
      The unique email of the User
    • name

      @NonNull private @NonNull String name
      The name of the User
    • surname

      @NonNull private @NonNull String surname
      The surname of the User
    • cityOfBirth

      @NonNull private @NonNull String cityOfBirth
      The city of birth of the User
    • dateOfBirth

      @NonNull private @NonNull Date dateOfBirth
      The date of birth of the User
    • hashPassword

      @NonNull private @NonNull String hashPassword
      The hash password of the User. Known issue: The password is not salted or peppered.
    • active

      @NonNull private @NonNull Boolean active
      A boolean that indicates if the User is active or not
    • refreshToken

      @NonNull private @NonNull String refreshToken
      The refresh token of the User. Known issue: The refresh token is stored in plain text, and if the database is compromised, the attacker can impersonate the user.
    • createdAt

      private Date createdAt
      The creation date of the User
    • updatedAt

      private Date updatedAt
      The last update date of the User
  • Constructor Details

    • User

      public User()
  • Method Details

    • equals

      public final boolean equals(Object o)
      Equals method for the User class
      Overrides:
      equals in class Object
      Parameters:
      o - the object to compare
      Returns:
      true if the object is equals to this, false otherwise
    • hashCode

      public final int hashCode()
      Hash code method for the User class
      Overrides:
      hashCode in class Object
      Returns:
      the hash code of this object