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 Summary
-
Constructor Summary
ConstructorDescriptionStrongPasswordRequirements
(long minLength, long minLowercase, long minUppercase, long minNumbers, long minSpecials) ConstructorStrongPasswordRequirements
(long minLength, long minLowercase, long minUppercase, long minNumbers, long minSpecials, String specialCharacters) Constructor -
Method Summary
Modifier and TypeMethodDescriptionGet the widget parameters to define a strong passwordlong
Determines if password must contains at least 1 lowercase characterlong
Determines if password must contains at least 1 numeric characterslong
Determines if password must contains at least 1 special characterlong
Determines if password must contains at least 1 uppercase charactervoid
toSAX
(ContentHandler contentHandler, String tagName) SAX password requirementsValidate input according the password requirement
-
Field Details
-
DEFAULT_SPECIAL_CHARACTERS
The special characters- See Also:
-
-
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 charactersminNumbers
- the minimun of numeric charactersminSpecials
- 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 charactersminUppercase
- the minimun of uppercase case charactersminNumbers
- the minimun of numeric charactersminSpecials
- the minimun of special charactersspecialCharacters
- the special characters
-
-
Method Details
-
minNumbers
Determines if password must contains at least 1 numeric characters- Returns:
- true if password must contains at least 1 numeric characters
-
minLowerCase
Determines if password must contains at least 1 lowercase character- Returns:
- true if password must contains at least 1 lowercase character
-
minUppercase
Determines if password must contains at least 1 uppercase character- Returns:
- true if password must contains at least 1 uppercase character
-
minSpecials
Determines if password must contains at least 1 special character- Returns:
- true if password must contains at least 1 special character
-
toSAX
SAX password requirements- Parameters:
contentHandler
- The content handlertagName
- 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
-