Package eu.webtoolkit.jwt.auth
Class AbstractPasswordService.StrengthValidatorResult
java.lang.Object
eu.webtoolkit.jwt.auth.AbstractPasswordService.StrengthValidatorResult
- Enclosing interface:
- AbstractPasswordService
Result returned when validating password strength.
This class contains information on the validity and the strength of the password together with possible messages. When the password is considered not strong enough, a message should be provided which helps the user pick a stronger password.
-
Constructor Summary
ConstructorsConstructorDescriptionStrengthValidatorResult
(boolean valid, CharSequence message, int strength) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionReturns a message describing the password strength.int
Returns the password strength in a scale of 0 to 5.boolean
isValid()
Returns whether the password is considered strong enough.
-
Constructor Details
-
StrengthValidatorResult
Constructor.
-
-
Method Details
-
isValid
public boolean isValid()Returns whether the password is considered strong enough. -
getMessage
Returns a message describing the password strength. -
getStrength
public int getStrength()Returns the password strength in a scale of 0 to 5.
-