Class User

java.lang.Object
org.ctan.site.domain.account.User

@Entity public class User extends Object
The domain class User contains the description of a user account on the site.
  • Constructor Details

    • User

      public User()
  • Method Details

    • accept

      public boolean accept(String passwd)
      The method accept provides means to check that the user is authenticated.
      Parameters:
      passwd - the password
      Returns:
      true iff the password is valid
    • getPrincipal

      public Principal getPrincipal()
      The method getPrincipal provides means to get the principal.
      Returns:
      the principal
    • getPrintable

      public User.PrintableUser getPrintable()
      The method getPrintable provides means to get the printable attributes of the user.
      Returns:
      the user attributes
    • setHashedPassword

      public void setHashedPassword(String passwd)
      The method setHashedPassword provides means to set the password. Internally the password is hashed and the hash is stored.

      The password may not be null and it has to have at least 8 characters.

      Parameters:
      passwd - the clear-text password
    • toString

      public String toString()
      Overrides:
      toString in class Object
      See Also: