|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.james.userrepository.DefaultUser
public class DefaultUser
Implementation of User Interface. Instances of this class do not allow the the user name to be reset.
Constructor Summary | |
---|---|
DefaultUser(java.lang.String name,
java.lang.String hashAlg)
Standard constructor. |
|
DefaultUser(java.lang.String name,
java.lang.String passwordHash,
java.lang.String hashAlg)
Constructor for repositories that are construcing user objects from separate fields, e.g. databases. |
Method Summary | |
---|---|
protected java.lang.String |
getHashAlgorithm()
Method to access the hashing algorithm of the password. |
protected java.lang.String |
getHashedPassword()
Method to access hash of password |
java.lang.String |
getUserName()
Accessor for immutable name |
boolean |
setPassword(java.lang.String newPass)
Sets new password from String. |
boolean |
verifyPassword(java.lang.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(java.lang.String name, java.lang.String hashAlg)
name
- the String name of this userhashAlg
- the algorithm used to generate the hash of the passwordpublic DefaultUser(java.lang.String name, java.lang.String passwordHash, java.lang.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 java.lang.String getUserName()
getUserName
in interface User
public boolean verifyPassword(java.lang.String pass)
verifyPassword
in interface User
pass
- the String that is claimed to be the password for this user
public boolean setPassword(java.lang.String newPass)
setPassword
in interface User
newPass
- the String that is the new password.
protected java.lang.String getHashedPassword()
protected java.lang.String getHashAlgorithm()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |