Class PasswordChecker

  • All Implemented Interfaces:
    com.netscape.certsrv.password.IConfigPasswordCheck, com.netscape.certsrv.password.IPasswordCheck

    public class PasswordChecker
    extends java.lang.Object
    implements com.netscape.certsrv.password.IPasswordCheck, com.netscape.certsrv.password.IConfigPasswordCheck
    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 Summary

      Fields 
      Modifier and Type Field Description
      static int MIN_LEN  
    • Constructor Summary

      Constructors 
      Constructor Description
      PasswordChecker()
      Default constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getConfigReason​(java.lang.String mPassword)
      Returns a reason if the password doesnt meet the quality requirement.
      java.lang.String getReason​(java.lang.String mPassword)
      Returns a reason if the password doesnt meet the quality requirement.
      boolean isGoodConfigPassword​(java.lang.String mPassword)
      Check if the password meets the quality requirement
      boolean isGoodPassword​(java.lang.String mPassword)
      Returns true if the given password meets the quality requirement; otherwise returns false.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PasswordChecker

        public PasswordChecker()
        Default constructor.
    • Method Detail

      • isGoodConfigPassword

        public boolean isGoodConfigPassword​(java.lang.String mPassword)
        Description copied from interface: com.netscape.certsrv.password.IConfigPasswordCheck
        Check if the password meets the quality requirement
        Specified by:
        isGoodConfigPassword in interface com.netscape.certsrv.password.IConfigPasswordCheck
        Parameters:
        mPassword - the given password
        Returns:
        true if the password meets the quality requirement; otherwise false
      • getConfigReason

        public java.lang.String getConfigReason​(java.lang.String mPassword)
        Description copied from interface: com.netscape.certsrv.password.IConfigPasswordCheck
        Returns a reason if the password doesnt meet the quality requirement.
        Specified by:
        getConfigReason in interface com.netscape.certsrv.password.IConfigPasswordCheck
        Parameters:
        mPassword - the given password
        Returns:
        a reason if the password quality requirement is not met.
      • isGoodPassword

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

        public java.lang.String getReason​(java.lang.String mPassword)
        Returns a reason if the password doesnt meet the quality requirement.
        Specified by:
        getReason in interface com.netscape.certsrv.password.IPasswordCheck
        Parameters:
        mPassword - the given password
        Returns:
        string as a reason if the password quality requirement is not met.