|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.james.userrepository.DefaultUser
Implementation of User Interface. Instances of this class do not allow the the user name to be reset.
Constructor Summary | |
DefaultUser(String name,
String hashAlg)
Standard constructor. |
|
DefaultUser(String name,
String passwordHash,
String hashAlg)
Constructor for repositories that are construcing user objects from separate fields, e.g. databases. |
Method Summary | |
protected String |
getHashAlgorithm()
Method to access the hashing algorithm of the password. |
protected String |
getHashedPassword()
Method to access hash of password |
String |
getUserName()
Accessor for immutable name |
boolean |
setPassword(String newPass)
Sets new password from String. |
boolean |
verifyPassword(String pass)
Method to verify passwords. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DefaultUser(String name, String hashAlg)
name
- the String name of this userhashAlg
- the algorithm used to generate the hash of the passwordpublic DefaultUser(String name, String passwordHash, String hashAlg)
name
- the String name of this userpasswordHash
- the String hash of this users current passwordhashAlg
- the String algorithm used to generate the hash of the
passwordMethod Detail |
public String getUserName()
getUserName
in interface User
public boolean verifyPassword(String pass)
verifyPassword
in interface User
pass
- the String that is claimed to be the password for this user
public boolean setPassword(String newPass)
setPassword
in interface User
newPass
- the String that is the new password.
protected String getHashedPassword()
protected String getHashAlgorithm()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |