public class DefaultUser extends Object implements org.apache.james.user.api.model.User, Serializable
| Constructor and Description |
|---|
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.
|
| Modifier and Type | Method and Description |
|---|---|
String |
getHashAlgorithm()
Method to access the hashing algorithm of the password.
|
String |
getHashedPassword()
Method to access hash of password
|
String |
getUserName() |
boolean |
setPassword(String newPass) |
boolean |
verifyPassword(String pass) |
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 passwordpublic String getUserName()
getUserName in interface org.apache.james.user.api.model.UserUser.getUserName()public boolean verifyPassword(String pass)
verifyPassword in interface org.apache.james.user.api.model.UserUser.verifyPassword(java.lang.String)public boolean setPassword(String newPass)
setPassword in interface org.apache.james.user.api.model.UserUser.setPassword(java.lang.String)public String getHashedPassword()
public String getHashAlgorithm()
Copyright © 2002-2017 The Apache Software Foundation. All Rights Reserved.