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 org.deltava.security.MultiAuthenticator
_dst, _src, log
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 TypeMethodDescriptionvoid
Adds the user to all authenticators.void
authenticate
(Person usr, String pwd) Authenticates the user against the source authenticator.boolean
Returns if the source and destination authenticators contain a particular directory name.void
Disables a User's account in all authenticators.void
Initializes the Authenticator.void
Removes the user from all authenticators.void
Renames the user in all authenticators.void
updatePassword
(Person usr, String pwd) Updates the user's password in all authenticators.Methods inherited from class org.deltava.security.MultiAuthenticator
accepts, clearConnection, getDestination, getSource, init, removeDestination, setConnection, sync
Methods inherited from class org.deltava.security.SQLAuthenticator
close, getConnection, setConnection
-
Constructor Details
-
MirrorAuthenticator
public MirrorAuthenticator()Creates the Authenticator.
-
-
Method Details
-
init
Initializes the Authenticator.- Specified by:
init
in interfaceAuthenticator
- Overrides:
init
in 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
-