Interface Authenticator
- All Superinterfaces:
AutoCloseable,Closeable
- All Known Implementing Classes:
ApacheFileAuthenticator,ApacheSQLAuthenticator,FileAuthenticator,FSDAuthenticator,LDAPAuthenticator,MigrationAuthenticator,MirrorAuthenticator,MultiAuthenticator,SQLAuthenticator
An interface for user authenticators.
- Since:
- 1.0
- Version:
- 9.0
- Author:
- Luke
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final StringDefault properties file used for authenticator configuration options. -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks if a particular user should exist within a Directory.voidAdds a user to the Directory.voidauthenticate(Person usr, String pwd) Authenticate a particular user given a set of credentials.default voidclose()booleanChecks if a particular user exists in the Directory.voidDisables a user's account in the Directory.voidInitializes the authenticator.voidRemoves a user from the Directory.voidRenames a user in the Directory.voidupdatePassword(Person usr, String pwd) Updates a user's password.
-
Field Details
-
DEFAULT_PROPS_FILE
Default properties file used for authenticator configuration options.- See Also:
-
-
Method Details
-
init
Initializes the authenticator.- Parameters:
propsFile- the properties file to use- Throws:
SecurityException- if an error occurs
-
authenticate
Authenticate a particular user given a set of credentials.- Parameters:
usr- the user beanpwd- the password- Throws:
SecurityException- if the authentication failed for any reason
-
contains
Checks if a particular user exists in the Directory.- Parameters:
usr- the user bean- Returns:
- TRUE if the user exists, otherwise FALSE
- Throws:
SecurityException- if an error occurs
-
accepts
Checks if a particular user should exist within a Directory. Not all Authenticators will include all users, and to avoid errors inMultiAuthenticatorimplementations, this method is included to validate which authenticators credentials should be cascaded to.- Parameters:
usr- the user bean- Returns:
- TRUE if the user will be added to the Directory if requested, otherwise FALSE
-
updatePassword
Updates a user's password. If the authenticator supports theaccepts(Person)method, then the user account should be re-enabled.- Parameters:
usr- the user beanpwd- the new password- Throws:
SecurityException- if an error occurs
-
add
Adds a user to the Directory.- Parameters:
usr- the user beanpwd- the user's password- Throws:
SecurityException- if an error occurs
-
disable
Disables a user's account in the Directory. This is an optional operation, if an implementation does not support this operation it should callremove(Person)instead.- Parameters:
usr- the user bean- Throws:
SecurityException- if an 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
-
remove
Removes a user from the Directory.- Parameters:
usr- the user bean- Throws:
SecurityException- if an error occurs
-
close
default void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-