Class PasswordTools.PasswordStrength
- java.lang.Object
-
- de.aristaflow.adept2.model.orgmodel.PasswordTools.PasswordStrength
-
- Enclosing class:
- PasswordTools
public static final class PasswordTools.PasswordStrength extends Object
The password strength information including score, verbal strength and for passwords that are not strong enough a warning and suggestions to help to choose a better password.
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getScore()
Get the password score, useful for the strength information.String
getStrength()
Get the localised password strength, from weak to very strong.String
getSuggestions()
Get feedback for the password to help choose better passwords.String
getWarning()
Get feedback for the password to help choose better passwords.
-
-
-
Method Detail
-
getScore
public int getScore()
Get the password score, useful for the strength information.- Returns:
- The password score, i.e. an integer from 0 (weak) - 4 (very strong).
-
getStrength
public String getStrength()
Get the localised password strength, from weak to very strong.- Returns:
- The password strength.
-
getWarning
public String getWarning()
Get feedback for the password to help choose better passwords. The warning explains what is wrong, e.g. 'this is a top-10 common password'.- Returns:
- Localised verbal feedback to explain what is wrong. Could be the empty string.
-
getSuggestions
public String getSuggestions()
Get feedback for the password to help choose better passwords. The suggestions are a possibly empty list to help choose a less guessable password, e.g. 'Add another word or two'.- Returns:
- Localised verbal feedback of password suggestions. Could be empty.
-
-