Class PasswordUtils
java.lang.Object
de.aristaflow.adept2.model.orgmodel.PasswordUtils
This class provides several helper methods for assuring password quality.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetBlacklist(Entity... entities) Gets a list of excluded words, that are values of specific attributes of the designated entities.static StringgetPasswordStrength(Locale locale, int score, String password) Get the localised password strength, from weak to strong.
-
Constructor Details
-
PasswordUtils
public PasswordUtils()
-
-
Method Details
-
getBlacklist
Gets a list of excluded words, that are values of specific attributes of the designated entities. For instance, the values of "lastName" or must not be used.- Parameters:
entities- The entities providing the attribute values disallowed as password.- Returns:
- A list of words that should not be used as password for the designated entities.
-
getPasswordStrength
Get the localised password strength, from weak to strong.- Parameters:
locale- The locale to be used.score- The password score that should be translated into the password strength expression.Integer.MIN_VALUEis for undefined strength.password- The password to get the strength for.- Returns:
- The password strength.
-