Class AbstractPasswordService.AbstractStrengthValidator
- Direct Known Subclasses:
PasswordStrengthValidator
- Enclosing interface:
- AbstractPasswordService
This class defines a specialized validator interface for evaluating password strength. The implementation allows to evaluate strength in addition to the normal validator functionality of validating a password.
The evaluateStrength()
computes the strength and returns
an instance of StrenghtValidatorResult which contains information on the validity and the
strength of the password together with possible messages.
-
Nested Class Summary
Nested classes/interfaces inherited from class eu.webtoolkit.jwt.WValidator
WValidator.Result
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionevaluateStrength
(String password, String loginName, String email) Evaluates the strength of a password.Validates a password.Validates a password.Methods inherited from class eu.webtoolkit.jwt.WValidator
getFormat, getInputFilter, getInvalidBlankText, getJavaScriptValidate, isMandatory, setInvalidBlankText, setMandatory
-
Constructor Details
-
AbstractStrengthValidator
public AbstractStrengthValidator()Constructor.
-
-
Method Details
-
evaluateStrength
public abstract AbstractPasswordService.StrengthValidatorResult evaluateStrength(String password, String loginName, String email) Evaluates the strength of a password.The result is an instance of
AbstractPasswordService.StrengthValidatorResult
which contains information on the validity and the strength of the password together with possible messages.The validator may take into account the user's login name and email address, to exclude passwords that are too similar to these.
-
validate
Validates a password.This uses
evaluateStrength()
, isValid() and message() to return the result of password validation. -
validate
Validates a password.Calls validate(password,
WString.Empty
, "");- Overrides:
validate
in classWValidator
-