org.glassfish.security.common
Class FileRealmHelper.User

java.lang.Object
  extended by org.glassfish.security.common.PrincipalImpl
      extended by org.glassfish.security.common.FileRealmHelper.User
All Implemented Interfaces:
Serializable, Principal
Enclosing class:
FileRealmHelper

public static class FileRealmHelper.User
extends PrincipalImpl

Represents a FileRealm user.

See Also:
Serialized Form

Constructor Summary
FileRealmHelper.User(String name)
          Constructor.
FileRealmHelper.User(String name, String[] groups, String realm, byte[] salt, byte[] hash, String algo)
          Constructor.
 
Method Summary
 String getAlgo()
           
 String[] getGroups()
          Return the names of the groups this user belongs to.
 byte[] getHash()
          Get hash value.
 byte[] getSalt()
          Returns salt value.
 void setAlgo(String algo)
           
 void setGroups(String[] grp)
          Set group membership.
 void setHash(byte[] hash)
          Set hash value.
 void setSalt(byte[] salt)
          Set salt value.
 
Methods inherited from class org.glassfish.security.common.PrincipalImpl
equals, getName, hashCode, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FileRealmHelper.User

public FileRealmHelper.User(String name)
Constructor.


FileRealmHelper.User

public FileRealmHelper.User(String name,
                            String[] groups,
                            String realm,
                            byte[] salt,
                            byte[] hash,
                            String algo)
Constructor.

Parameters:
name - User name.
groups - Group memerships.
realm - Realm.
salt - SSHA salt.
hash - SSHA password hash.
Method Detail

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

public String[] getGroups()
Return the names of the groups this user belongs to.

Returns:
String[] List of group memberships.

setGroups

public void setGroups(String[] grp)
Set group membership.


getAlgo

public String getAlgo()
Returns:
the algo

setAlgo

public void setAlgo(String algo)
Parameters:
algo - the algo to set


Copyright © 2012 GlassFish Community. All Rights Reserved.