Class AbstractPasswordService.AbstractStrengthValidator
- java.lang.Object
-
- eu.webtoolkit.jwt.WValidator
-
- eu.webtoolkit.jwt.auth.AbstractPasswordService.AbstractStrengthValidator
-
- Direct Known Subclasses:
PasswordStrengthValidator
- Enclosing interface:
- AbstractPasswordService
public abstract static class AbstractPasswordService.AbstractStrengthValidator extends WValidator
Validator for password strength.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
Constructors Constructor Description AbstractStrengthValidator()Constructor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract AbstractPasswordService.StrengthValidatorResultevaluateStrength(java.lang.String password, java.lang.String loginName, java.lang.String email)Evaluates the strength of a password.WValidator.Resultvalidate(java.lang.String password)Validates a password.WValidator.Resultvalidate(java.lang.String password, java.lang.String loginName, java.lang.String email)Validates a password.-
Methods inherited from class eu.webtoolkit.jwt.WValidator
getFormat, getInputFilter, getInvalidBlankText, getJavaScriptValidate, isMandatory, setInvalidBlankText, setMandatory
-
-
-
-
Method Detail
-
evaluateStrength
public abstract AbstractPasswordService.StrengthValidatorResult evaluateStrength(java.lang.String password, java.lang.String loginName, java.lang.String email)
Evaluates the strength of a password.The result is an instance of
AbstractPasswordService.StrengthValidatorResultwhich 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
public WValidator.Result validate(java.lang.String password, java.lang.String loginName, java.lang.String email)
Validates a password.This uses
evaluateStrength(), isValid() and message() to return the result of password validation.
-
validate
public WValidator.Result validate(java.lang.String password)
Validates a password.Calls validate(password,
WString.Empty, "");- Overrides:
validatein classWValidator
-
-