Package org.glassfish.security.common
Class FileRealmHelper.User
java.lang.Object
org.glassfish.security.common.FileRealmHelper.User
- All Implemented Interfaces:
Serializable,Principal,UserPrincipal
- Enclosing class:
- FileRealmHelper
Represents a FileRealm user.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleangetAlgo()String[]Return the names of the groups this user belongs to.byte[]getHash()Get hash value.getName()Gets the name of the Principal as a java.lang.Stringbyte[]getSalt()Returns salt value.inthashCode()voidvoidSet group membership.voidsetHash(byte[] hash) Set hash value.voidsetSalt(byte[] salt) Set salt value.toString()
-
Constructor Details
-
User
Constructor. -
User
Constructor.- Parameters:
name- User name.groups- Group memerships.realm- Realm.salt- SSHA salt.hash- SSHA password hash.
-
-
Method Details
-
getName
Gets the name of the Principal as a java.lang.String -
getSalt
public byte[] getSalt()Returns salt value. -
setSalt
public void setSalt(byte[] salt) Set salt value. -
getHash
public byte[] getHash()Get hash value. -
setHash
public void setHash(byte[] hash) Set hash value. -
getGroups
Return the names of the groups this user belongs to.- Returns:
- String[] List of group memberships.
-
setGroups
Set group membership. -
getAlgo
- Returns:
- the algo
-
setAlgo
- Parameters:
algo- the algo to set
-
equals
-
hashCode
public int hashCode() -
toString
-