Class ApacheSQLAuthenticator
java.lang.Object
org.deltava.security.SQLAuthenticator
org.deltava.security.ApacheSQLAuthenticator
- All Implemented Interfaces:
Closeable
,AutoCloseable
,Authenticator
An Authenticator to authenticate users against Apache2-style database tables.
- Since:
- 1.0
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields inherited from class org.deltava.security.SQLAuthenticator
_props
Fields inherited from interface org.deltava.security.Authenticator
DEFAULT_PROPS_FILE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
This Authenticator will accept all users.void
Adds a user to the Directory.void
authenticate
(Person usr, String pwd) Authenticates a user by validating the password against the database.boolean
Checks if a particular name exists in the Directory.void
Disables a user's account.void
Removes a user from the Directory.void
Renames a user in the Directory.void
updatePassword
(Person usr, String pwd) Updates a User's password.Methods inherited from class org.deltava.security.SQLAuthenticator
close, getConnection, init, setConnection
-
Constructor Details
-
ApacheSQLAuthenticator
public ApacheSQLAuthenticator()
-
-
Method Details
-
authenticate
Authenticates a user by validating the password against the database.- Parameters:
usr
- the User beanpwd
- the supplied password- Throws:
SecurityException
- if a JDBC error occurs
-
accepts
This Authenticator will accept all users.- Parameters:
usr
- the user bean- Returns:
- TRUE if the user will be added to the Directory if requested, otherwise FALSE
-
contains
Checks if a particular name exists in the Directory.- Parameters:
usr
- the user bean- Returns:
- TRUE if the user exists, otherwise FALSE
- Throws:
SecurityException
- if a JDBC error occurs
-
updatePassword
Updates a User's password.- Parameters:
usr
- the User beanpwd
- the new password- Throws:
SecurityException
- if a JDBC error occurs
-
add
Adds a user to the Directory.- Parameters:
usr
- the User beanpwd
- the User's password- Throws:
SecurityException
- if a JDBC error occurs
-
rename
Renames a user in the Directory.- Parameters:
usr
- the user beannewName
- the new fully-qualified directory- Throws:
SecurityException
- if an error occurs
-
disable
Disables a user's account.- Parameters:
usr
- the user bean- Throws:
SecurityException
- if an error occurs
-
remove
Removes a user from the Directory. This will fail silently if the user does not exist in the Directory.- Parameters:
usr
- the user bean- Throws:
SecurityException
- if a JDBC error occurs
-