|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.exist.security.User
public class User
Represents a user within the database.
Field Summary | |
---|---|
static boolean |
CHECK_PASSWORDS
|
static User |
DEFAULT
|
static int |
MD5_ENCODING
|
static int |
PASSWORD_ENCODING
|
static int |
PLAIN_ENCODING
|
static int |
SIMPLE_MD5_ENCODING
|
Constructor Summary | |
---|---|
User(int majorVersion,
int minorVersion,
Element node)
Read a new user from the given DOM node |
|
User(String user)
Create a new user with name |
|
User(String user,
String password)
Create a new user with name and password |
|
User(String user,
String password,
String primaryGroup)
Create a new user with name, password and primary group |
Method Summary | |
---|---|
void |
addGroup(String group)
Add the user to a group |
String |
digest(String passwd)
|
static void |
enablePasswordChecks(boolean check)
|
boolean |
equals(Object obj)
|
String |
getDigestPassword()
|
String[] |
getGroups()
Get all groups this user belongs to |
XmldbURI |
getHome()
|
String |
getName()
Get the user name |
String |
getPassword()
Get the user's password |
String |
getPrimaryGroup()
Get the primary group this user belongs to |
int |
getUID()
|
boolean |
hasDbaRole()
|
boolean |
hasGroup(String group)
Is the user a member of group? |
void |
remGroup(String group)
Remove the user to a group Added by {Marco.Tampucci and Massimo.Martinelli}@isti.cnr.it |
void |
setEncodedPassword(String passwd)
Sets the encoded passwod value of the User object |
void |
setGroups(String[] groups)
|
void |
setHome(XmldbURI homeCollection)
|
void |
setPassword(String passwd)
Sets the password attribute of the User object |
void |
setPasswordDigest(String passwd)
Sets the digest passwod value of the User object |
static void |
setPasswordEncoding(String encoding)
|
static void |
setPasswordRealm(String value)
|
void |
setUID(int uid)
|
String |
toString()
|
boolean |
validate(String passwd)
Split up the validate method into two, to make it possible to authenticate users, which are not defined in the instance named "exist" without having impact on the standard functionality. |
boolean |
validate(String passwd,
SecurityManager sm)
|
boolean |
validateDigest(String passwd)
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final User DEFAULT
public static final int PLAIN_ENCODING
public static final int SIMPLE_MD5_ENCODING
public static final int MD5_ENCODING
public static int PASSWORD_ENCODING
public static boolean CHECK_PASSWORDS
Constructor Detail |
---|
public User(String user, String password)
user
- Description of the Parameterpassword
- Description of the Parameterpublic User(String user)
user
- Description of the Parameterpublic User(String user, String password, String primaryGroup)
user
- Description of the Parameterpassword
- Description of the ParameterprimaryGroup
- Description of the Parameterpublic User(int majorVersion, int minorVersion, Element node) throws DatabaseConfigurationException
node
- Description of the Parameter
DatabaseConfigurationException
- Description of the ExceptionMethod Detail |
---|
public static void enablePasswordChecks(boolean check)
public static void setPasswordEncoding(String encoding)
public static void setPasswordRealm(String value)
public final void addGroup(String group)
group
- The feature to be added to the Group attributepublic final void remGroup(String group)
group
- The feature to be removed to the Group attributepublic final void setGroups(String[] groups)
public final String[] getGroups()
public final boolean hasDbaRole()
public final String getName()
public final int getUID()
public final String getPassword()
public final String getDigestPassword()
public final String getPrimaryGroup()
public final boolean hasGroup(String group)
group
- Description of the Parameter
public final void setPassword(String passwd)
passwd
- The new password valuepublic final void setPasswordDigest(String passwd)
passwd
- The new passwordDigest valuepublic final void setEncodedPassword(String passwd)
passwd
- The new passwordDigest valuepublic final String digest(String passwd)
public final String toString()
toString
in class Object
public final boolean validate(String passwd)
passwd
-
public final boolean validate(String passwd, SecurityManager sm)
public final boolean validateDigest(String passwd)
public void setUID(int uid)
public void setHome(XmldbURI homeCollection)
public XmldbURI getHome()
public boolean equals(Object obj)
equals
in class Object
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |