|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.turbine.services.security.ldap.LDAPUserManager
A UserManager performs User
object related tasks on behalf of the
SecurityService
.
This implementation uses ldap for retrieving user data. It
expects that the User interface implementation will be castable to
org.apache.turbine.om.BaseObject
.
Fields inherited from interface org.apache.turbine.services.security.ldap.LDAPSecurityConstants |
LDAP_ADMIN_PASSWRD, LDAP_ADMIN_USRNAME, LDAP_BASE_SERACH, LDAP_DN_ATTR, LDAP_HOST, LDAP_PORT, LDAP_PROVIDER, LDAP_SEARCH_FLTR |
Constructor Summary | |
LDAPUserManager()
|
Method Summary | |
boolean |
accountExists(java.lang.String username)
Check wether a specified user's account exists. |
boolean |
accountExists(User user)
Check wether a specified user's account exists. |
void |
authenticate(User user,
java.lang.String password)
Authenticate a User with the specified password. |
javax.naming.directory.DirContext |
bind(java.lang.String username,
java.lang.String password)
Creats an initial context. |
void |
changePassword(User user,
java.lang.String oldPassword,
java.lang.String newPassword)
This method is not yet implemented Change the password for an User. |
void |
createAccount(User user,
java.lang.String initialPassword)
This method is not yet implemented Creates new user account with specified attributes. |
void |
forcePassword(User user,
java.lang.String password)
This method is not yet implemented Forcibly sets new password for an User. |
void |
removeAccount(User user)
This method is not yet implemented Removes an user account from the system. |
User[] |
retrieve(org.apache.torque.util.Criteria criteria)
This is currently not implemented to behave as expected. |
User |
retrieve(java.lang.String username)
Retrieve a user from persistent storage using username as the key. |
User |
retrieve(java.lang.String username,
java.lang.String password)
Retrieve a user from persistent storage using username as the key, and authenticate the user. |
void |
store(User user)
This method is not yet implemented Save a User object to persistent storage. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LDAPUserManager()
Method Detail |
public boolean accountExists(User user) throws DataBackendException
accountExists
in interface UserManager
user
- The user to be checked.DataBackendException
- Error accessing the data backend.public boolean accountExists(java.lang.String username) throws DataBackendException
accountExists
in interface UserManager
usename
- The name of the user to be checked.DataBackendException
- Error accessing the data backend.public User retrieve(java.lang.String username) throws UnknownEntityException, DataBackendException
retrieve
in interface UserManager
username
- the name of the user.UnknownEntityException
- if the user's account does not
exist in the database.DataBackendException
- Error accessing the data backend.public User[] retrieve(org.apache.torque.util.Criteria criteria) throws DataBackendException
User
interface, plus the the names
of the custom attributes you added to your user representation
in the data storage. Use verbatim names of the attributes -
without table name prefix in case of DB implementation.retrieve
in interface UserManager
criteria
- The criteria of selection.DataBackendException
- Error accessing the data backend.public User retrieve(java.lang.String username, java.lang.String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
retrieve
in interface UserManager
username
- the name of the user.password
- the user supplied password.PasswordMismatchException
- if the supplied password was
incorrect.UnknownEntityException
- if the user's account does not
exist in the database.DataBackendException
- Error accessing the data backend.public void store(User user) throws UnknownEntityException, DataBackendException
store
in interface UserManager
user
- an User object to store.UnknownEntityException
- if the user's account does not
exist in the database.public void authenticate(User user, java.lang.String password) throws PasswordMismatchException, UnknownEntityException, DataBackendException
authenticate
in interface UserManager
user
- a User object to authenticate.password
- the user supplied password.PasswordMismatchException
- if the supplied password was
incorrect.UnknownEntityException
- if the user's account does not
exist in the database.DataBackendException
- Error accessing the data backend.public void changePassword(User user, java.lang.String oldPassword, java.lang.String newPassword) throws PasswordMismatchException, UnknownEntityException, DataBackendException
changePassword
in interface UserManager
user
- an User to change password for.password
- the new password.PasswordMismatchException
- if the supplied password was
incorrect.UnknownEntityException
- if the user's account does not
exist in the database.DataBackendException
- Error accessing the data backend.public void forcePassword(User user, java.lang.String password) throws UnknownEntityException, DataBackendException
forcePassword
in interface UserManager
user
- an User to change password for.password
- the new password.UnknownEntityException
- if the user's record does not
exist in the database.DataBackendException
- Error accessing the data backend.public void createAccount(User user, java.lang.String initialPassword) throws EntityExistsException, DataBackendException
createAccount
in interface UserManager
user
- the object describing account to be created.DataBackendException
- Error accessing the data backend.EntityExistsException
- if the user account already exists.public void removeAccount(User user) throws UnknownEntityException, DataBackendException
removeAccount
in interface UserManager
user
- the object describing the account to be removed.DataBackendException
- Error accessing the data backend.UnknownEntityException
- if the user account is not present.public javax.naming.directory.DirContext bind(java.lang.String username, java.lang.String password) throws javax.naming.NamingException, DataBackendException, UnknownEntityException
ldap
- admin username supplied in TRP.ldap
- admin password supplied in TRPDataBackendException
- Error accessing the data backend.UnknownEntityException
- if the user account is not present.javax.naming.NamingException
- when an error occurs with the named server.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |