Class MirrorAuthenticator
java.lang.Object
org.deltava.security.SQLAuthenticator
org.deltava.security.MultiAuthenticator
org.deltava.security.MirrorAuthenticator
- All Implemented Interfaces:
Closeable, AutoCloseable, Authenticator
An Authenticator used to mirror data from one authenticator to another. When a user is sucessfully authenticated by the first ("source")
Authenticator, the directory name and password are written into the second ("destination") Authenticator.
- Since:
- 1.0
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields inherited from class MultiAuthenticator
_dst, _src, logFields inherited from class SQLAuthenticator
_propsFields inherited from interface Authenticator
DEFAULT_PROPS_FILE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds the user to all authenticators.voidauthenticate(Person usr, String pwd) Authenticates the user against the source authenticator.booleanReturns if the source and destination authenticators contain a particular directory name.voidDisables a User's account in all authenticators.voidInitializes the Authenticator.voidRemoves the user from all authenticators.voidRenames the user in all authenticators.voidupdatePassword(Person usr, String pwd) Updates the user's password in all authenticators.Methods inherited from class MultiAuthenticator
accepts, clearConnection, getDestination, getSource, init, removeDestination, setConnection, syncMethods inherited from class SQLAuthenticator
close, getConnection, setConnection
-
Constructor Details
-
MirrorAuthenticator
public MirrorAuthenticator()Creates the Authenticator.
-
-
Method Details
-
init
Initializes the Authenticator.- Specified by:
initin interfaceAuthenticator- Overrides:
initin classSQLAuthenticator- Parameters:
propsFile- the name of the proeprties file to load- Throws:
SecurityException- if an error occurs
-
authenticate
Authenticates the user against the source authenticator. This then synchronizes credentials information with the destination authenticator.- Parameters:
usr- the User beanpwd- the user's supplied password- Throws:
SecurityException- if authentication fails- See Also:
-
contains
Returns if the source and destination authenticators contain a particular directory name.- Parameters:
usr- the user bean- Returns:
- TRUE if the source authenticator contains the user, otherwise FALSE
- Throws:
SecurityException- if an error occurs- See Also:
-
updatePassword
Updates the user's password in all authenticators. If this operation fails, no guarantee of transaction atomicity is given.- Parameters:
usr- the user beanpwd- the user's new password- Throws:
SecurityException- if either update operation fails
-
add
Adds the user to all authenticators. If this operation fails, no guarantee of transaction atomicity is given.- Parameters:
usr- the User beanpwd- the user's password- Throws:
SecurityException- if either add operation fails
-
rename
Renames the user in all authenticators. If this operation fails, no guarantee of transaction atomicity is given.- Parameters:
usr- the user beannewName- the new directory name- Throws:
SecurityException- if an error occurs
-
disable
Disables a User's account in all authenticators. If this operation fails, no guarantee of transaction atomicity is given.- Parameters:
usr- the user bean- Throws:
SecurityException- if an error occurs
-
remove
Removes the user from all authenticators. If this operation fails, no guarantee of transaction atomicity is given.- Parameters:
usr- the user bean- Throws:
SecurityException- if an error occurs
-