public class DefaultUser extends Object implements 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.
|
| 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()
Return the user name of this user
|
boolean |
setPassword(String newPass)
Sets new password from String.
|
boolean |
verifyPassword(String pass)
Return true if pass matches password of this user.
|
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()
UsergetUserName in interface UserUser.getUserName()public boolean verifyPassword(String pass)
UserverifyPassword in interface Userpass - the password to testUser.verifyPassword(java.lang.String)public boolean setPassword(String newPass)
UsersetPassword in interface UsernewPass - the String that is the new password.User.setPassword(java.lang.String)public String getHashedPassword()
public String getHashAlgorithm()
Copyright © 2002-2012 The Apache Software Foundation. All Rights Reserved.