Class PasswordChecker

java.lang.Object
com.netscape.cms.password.PasswordChecker
All Implemented Interfaces:
IPasswordCheck

public class PasswordChecker extends Object implements IPasswordCheck
This class checks the given password if it meets the specific requirements. For example, it can also specify the format of the password which has to be 8 characters long and must be in alphanumeric.

Version:
$Revision$, $Date$
  • Field Details

  • Constructor Details

    • PasswordChecker

      public PasswordChecker()
      Default constructor.
  • Method Details

    • isGoodPassword

      public boolean isGoodPassword(String mPassword)
      Returns true if the given password meets the quality requirement; otherwise returns false.
      Specified by:
      isGoodPassword in interface IPasswordCheck
      Parameters:
      mPassword - The given password being checked.
      Returns:
      true if the password meets the quality requirement; otherwise returns false.
    • getReason

      public String getReason(String mPassword)
      Returns a reason if the password doesn't meet the quality requirement.
      Specified by:
      getReason in interface IPasswordCheck
      Parameters:
      mPassword - the given password
      Returns:
      string as a reason if the password quality requirement is not met.