Class PasswordHelper

java.lang.Object
org.dlese.dpc.schemedit.security.login.PasswordHelper

public class PasswordHelper extends Object
Manages password entries in the password file.
Author:
Jonathan Ostwald
  • Method Details

    • getInstance

      public static PasswordHelper getInstance(String pwdPath)
      All calls to this method must supply the same "pwdPath" argument.

      This is necessary since FileLogin must call this each time through initialize

      Parameters:
      pwdPath - NOT YET DOCUMENTED
      Returns:
      The instance value
    • getInstance

      public static PasswordHelper getInstance()
      Gets the instance attribute of the PasswordHelper class
      Returns:
      The instance value
    • load

      public Hashtable load() throws Exception
      Creates hashtable of users
      Returns:
      NOT YET DOCUMENTED
      Throws:
      Exception - NOT YET DOCUMENTED
    • main

      public static void main(String[] args)
      The main program for the PasswordHelper class
      Parameters:
      args - The command line arguments
    • getPassword

      public String getPassword(String username) throws Exception
      Gets the password for supplied username.
      Parameters:
      username - username for which to retrieve password.
      Returns:
      The password value
      Throws:
      Exception - if User not found for supplied username
    • update

      public void update(String username, String password) throws Exception
      Updates password file with username and password.
      Parameters:
      username - username to be updated
      password - password of user
      Throws:
      Exception - NOT YET DOCUMENTED
    • remove

      public void remove(String username) throws Exception
      Writes password file with current user information.
      Throws:
      Exception - NOT YET DOCUMENTED