Class FSDAuthenticator

java.lang.Object
org.deltava.security.FSDAuthenticator
All Implemented Interfaces:
Closeable, AutoCloseable, Authenticator

public class FSDAuthenticator extends Object implements Authenticator
An Authenticator to read/write from FSD certificate files.
Since:
1.0
Version:
11.1
Author:
Luke
  • Constructor Details

    • FSDAuthenticator

      public FSDAuthenticator()
  • Method Details

    • init

      public void init(String propsFile) throws SecurityException
      Initialize the Authenticator and populate its user list from a file.
      Specified by:
      init in interface Authenticator
      Parameters:
      propsFile - the properties file to use
      Throws:
      SecurityException - if an error occurs
    • authenticate

      public void authenticate(Person usr, String pwd) throws SecurityException
      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:
      authenticate in interface Authenticator
      Parameters:
      usr - the User bean
      pwd - the user's password
      Throws:
      SecurityException - if authentication fails
    • accepts

      public boolean accepts(Person usr)
      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:
      accepts in interface Authenticator
      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

      public boolean contains(Person usr) throws SecurityException
      Checks if a particular name exists in the Directory.
      Specified by:
      contains in interface Authenticator
      Parameters:
      usr - the User bean
      Returns:
      TRUE if the user exists, otherwise FALSE
      Throws:
      SecurityException - if an error occurs
    • updatePassword

      public void updatePassword(Person usr, String pwd) throws SecurityException
      Updates a User's password.
      Specified by:
      updatePassword in interface Authenticator
      Parameters:
      usr - the User bean
      pwd - the new password
      Throws:
      SecurityException - if an error occurs
    • add

      public void add(Person usr, String pwd) throws SecurityException
      Adds a user to the Directory.
      Specified by:
      add in interface Authenticator
      Parameters:
      usr - the User bean
      pwd - the User's password
      Throws:
      SecurityException - if an error occurs
    • rename

      public void rename(Person usr, String newName) throws SecurityException
      Renames a user in the Directory. Since the FSD Authenticator relies upon database IDs and pilot codes, this is not implemented.
      Specified by:
      rename in interface Authenticator
      Parameters:
      usr - the user bean
      newName - the new fully-qualified directory
      Throws:
      SecurityException - if an error occurs
    • remove

      public void remove(Person usr) throws SecurityException
      Removes a user from the Directory.
      Specified by:
      remove in interface Authenticator
      Parameters:
      usr - the User bean
      Throws:
      SecurityException - if an error occurs
    • disable

      public void disable(Person usr) throws SecurityException
      Disables a user's account. This removes the account.
      Specified by:
      disable in interface Authenticator
      Parameters:
      usr - the user bean
      Throws:
      SecurityException - if an error occurs