Package org.ctan.site.domain.account
Class User
java.lang.Object
org.ctan.site.domain.AbstractEntity
org.ctan.site.domain.account.User
The domain class
User
contains the description of a user account
on the site.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final class
The classCtanPrincipal
contains the transport object for authentication.static class
The classPrintableUser
contains the printable attributes of a user. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
The methodaccept
provides means to check that the user is authenticated.The methodgetPrincipal
provides means to get the principal.The methodgetPrintable
provides means to get the printable attributes of the user.void
setHashedPassword
(String passwd) The methodsetHashedPassword
provides means to set the password.toString()
-
Constructor Details
-
User
public User()
-
-
Method Details
-
accept
The methodaccept
provides means to check that the user is authenticated.- Parameters:
passwd
- the password- Returns:
true
iff the password is valid
-
getPrincipal
The methodgetPrincipal
provides means to get the principal.- Returns:
- the principal
-
getPrintable
The methodgetPrintable
provides means to get the printable attributes of the user.- Returns:
- the user attributes
-
setHashedPassword
The methodsetHashedPassword
provides means to set the password. Internally the password is hashed and the hash is stored.- Parameters:
passwd
- the clear-text password
-
toString
-