Wt: Wt::Auth::AbstractPasswordService::AbstractStrengthValidator Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Member Functions
Wt::Auth::AbstractPasswordService::AbstractStrengthValidator Class Reference

Validator for password strength. More...

Inheritance diagram for Wt::Auth::AbstractPasswordService::AbstractStrengthValidator:
[legend]

List of all members.

## Public Member Functions
virtual StrengthValidatorResult | evaluateStrength (const WString &password, const WString &loginName, const std::string &email) const =0
| Evaluates the strength of a password.
virtual Result | validate (const WString &password, const WString &loginName, const std::string &email) const
| Validates a password.
virtual Result | validate (const WString &password) const
| Validates a password.

## Detailed Description

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.

See also:
  strengthValidator()

## Member Function Documentation

virtual StrengthValidatorResult Wt::Auth::AbstractPasswordService::AbstractStrengthValidator::evaluateStrength | ( | const WString & | password,
|  | const WString & | loginName,
|  | const std::string & | email
| ) |  | const`[pure virtual]`

Evaluates the strength of a password.

The result is an instance of 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.

Implemented in Wt::Auth::PasswordStrengthValidator.

WValidator::Result Wt::Auth::AbstractPasswordService::AbstractStrengthValidator::validate | ( | const WString & | password,
|  | const WString & | loginName,
|  | const std::string & | email
| ) |  | const`[virtual]`

Validates a password.

This uses evaluateStrength(), isValid() and message() to return the result of password validation.

WValidator::Result Wt::Auth::AbstractPasswordService::AbstractStrengthValidator::validate | ( | const WString & | password | ) | const`[virtual]`

Validates a password.

Calls validate(password, WString::Empty, "");

Reimplemented from Wt::WValidator.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator