Class FSDAuthenticator
java.lang.Object
org.deltava.security.FSDAuthenticator
- All Implemented Interfaces:
Closeable,AutoCloseable,Authenticator
An Authenticator to read/write from FSD certificate files.
- Since:
- 1.0
- Version:
- 11.1
- Author:
- Luke
-
Field Summary
Fields inherited from interface org.deltava.security.Authenticator
DEFAULT_PROPS_FILE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionbooleanChecks whether this Authenticator accepts a User.voidAdds a user to the Directory.voidauthenticate(Person usr, String pwd) Authenticates the user by searching for the directory name and then comparing the existing password on file to the one specified.booleanChecks if a particular name exists in the Directory.voidDisables a user's account.voidInitialize the Authenticator and populate its user list from a file.voidRemoves a user from the Directory.voidRenames a user in the Directory.voidupdatePassword(Person usr, String pwd) Updates a User's password.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.deltava.security.Authenticator
close
-
Constructor Details
-
FSDAuthenticator
public FSDAuthenticator()
-
-
Method Details
-
init
Initialize the Authenticator and populate its user list from a file.- Specified by:
initin interfaceAuthenticator- Parameters:
propsFile- the properties file to use- Throws:
SecurityException- if an error occurs
-
authenticate
Authenticates the user by searching for the directory name and then comparing the existing password on file to the one specified. Even if the credentials match, authentication will fail if the user's roles do not translate to at least Level 1.- Specified by:
authenticatein interfaceAuthenticator- Parameters:
usr- the User beanpwd- the user's password- Throws:
SecurityException- if authentication fails
-
accepts
Checks whether this Authenticator accepts a User. The user must be a member of a role that maps to at least Level 1.- Specified by:
acceptsin interfaceAuthenticator- Parameters:
usr- the user bean- Returns:
- TRUE if the User is a member of a Role mapping to at least Level 1, otherwise FALSE
-
contains
Checks if a particular name exists in the Directory.- Specified by:
containsin interfaceAuthenticator- Parameters:
usr- the User bean- Returns:
- TRUE if the user exists, otherwise FALSE
- Throws:
SecurityException- if an error occurs
-
updatePassword
Updates a User's password.- Specified by:
updatePasswordin interfaceAuthenticator- Parameters:
usr- the User beanpwd- the new password- Throws:
SecurityException- if an error occurs
-
add
Adds a user to the Directory.- Specified by:
addin interfaceAuthenticator- Parameters:
usr- the User beanpwd- the User's password- Throws:
SecurityException- if an error occurs
-
rename
Renames a user in the Directory. Since the FSD Authenticator relies upon database IDs and pilot codes, this is not implemented.- Specified by:
renamein interfaceAuthenticator- Parameters:
usr- the user beannewName- the new fully-qualified directory- Throws:
SecurityException- if an error occurs
-
remove
Removes a user from the Directory.- Specified by:
removein interfaceAuthenticator- Parameters:
usr- the User bean- Throws:
SecurityException- if an error occurs
-
disable
Disables a user's account. This removes the account.- Specified by:
disablein interfaceAuthenticator- Parameters:
usr- the user bean- Throws:
SecurityException- if an error occurs
-