Class JdbcUserDirectory.StrongPasswordRequirements

java.lang.Object
org.ametys.plugins.core.impl.user.directory.JdbcUserDirectory.StrongPasswordRequirements
Enclosing class:
JdbcUserDirectory

Class representing the requirements for strong password policy
  • Field Details

  • Constructor Details

    • StrongPasswordRequirements

      public StrongPasswordRequirements(long minLength, long minLowercase, long minUppercase, long minNumbers, long minSpecials)
      Constructor
      Parameters:
      minLength - the minimum password length. The minimun is 8.
      minLowercase - the minimun of lower case characters.
      minUppercase - the minimun of uppercase case characters
      minNumbers - the minimun of numeric characters
      minSpecials - the minimun of special characters
    • StrongPasswordRequirements

      public StrongPasswordRequirements(long minLength, long minLowercase, long minUppercase, long minNumbers, long minSpecials, String specialCharacters)
      Constructor
      Parameters:
      minLength - the minimum password length. The minimun is 8.
      minLowercase - the minimun of lower case characters
      minUppercase - the minimun of uppercase case characters
      minNumbers - the minimun of numeric characters
      minSpecials - the minimun of special characters
      specialCharacters - the special characters
  • Method Details

    • minNumbers

      public long minNumbers()
      Determines if password must contains at least 1 numeric characters
      Returns:
      true if password must contains at least 1 numeric characters
    • minLowerCase

      public long minLowerCase()
      Determines if password must contains at least 1 lowercase character
      Returns:
      true if password must contains at least 1 lowercase character
    • minUppercase

      public long minUppercase()
      Determines if password must contains at least 1 uppercase character
      Returns:
      true if password must contains at least 1 uppercase character
    • minSpecials

      public long minSpecials()
      Determines if password must contains at least 1 special character
      Returns:
      true if password must contains at least 1 special character
    • toSAX

      public void toSAX(ContentHandler contentHandler, String tagName) throws SAXException
      SAX password requirements
      Parameters:
      contentHandler - The content handler
      tagName - the tag name
      Throws:
      SAXException - if an error occured while saxing
    • getWidgetParameters

      Get the widget parameters to define a strong password
      Returns:
      the widget parameters
    • validate

      Validate input according the password requirement
      Parameters:
      value - the password value
      Returns:
      the list of error messages