Wt  3.3.8
Public Member Functions | List of all members
Wt::Auth::AbstractPasswordService::AbstractStrengthValidator Class Referenceabstract

Validator for password strength. More...

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

Public Member Functions

virtual StrengthValidatorResult evaluateStrength (const WString &password, const WString &loginName, const std::string &email) const =0
 Evaluates the strength of a password. More...
 
virtual Result validate (const WString &password, const WString &loginName, const std::string &email) const
 Validates a password. More...
 
virtual Result validate (const WString &password) const
 Validates a password. More...
 
- Public Member Functions inherited from Wt::WValidator
 WValidator (WObject *parent=0)
 Creates a new validator.
 
 WValidator (bool mandatory, WObject *parent=0)
 Creates a new validator. More...
 
 ~WValidator ()
 Destructor. More...
 
void setMandatory (bool how)
 Sets if input is mandatory. More...
 
bool isMandatory () const
 Returns if input is mandatory.
 
void setInvalidBlankText (const WString &text)
 Sets the message to display when a mandatory field is left blank. More...
 
WString invalidBlankText () const
 Returns the message displayed when a mandatory field is left blank. More...
 
virtual WString format () const
 Returns the validator format. More...
 
virtual void createExtConfig (std::ostream &config) const
 Provides Ext-compatible config options for client-side validation.
 
virtual std::string javaScriptValidate () const
 Creates a Javascript object that validates the input. More...
 
virtual std::string inputFilter () const
 Returns a regular expression that filters input. More...
 
- Public Member Functions inherited from Wt::WObject
 WObject (WObject *parent=0)
 Create a WObject with a given parent object. More...
 
virtual ~WObject ()
 Destructor. More...
 
virtual const std::string id () const
 Returns the (unique) identifier for this object. More...
 
virtual void setObjectName (const std::string &name)
 Sets an object name. More...
 
virtual std::string objectName () const
 Returns the object name. More...
 
void resetLearnedSlots ()
 Resets learned stateless slot implementations. More...
 
template<class T >
void resetLearnedSlot (void(T::*method)())
 Resets a learned stateless slot implementation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)())
 Declares a slot to be stateless and learn client-side behaviour on first invocation. More...
 
template<class T >
WStatelessSlot * implementStateless (void(T::*method)(), void(T::*undoMethod)())
 Declares a slot to be stateless and learn client-side behaviour in advance. More...
 
void isNotStateless ()
 Marks the current function as not stateless. More...
 
template<class T >
WStatelessSlot * implementJavaScript (void(T::*method)(), const std::string &jsCode)
 Provides a JavaScript implementation for a method. More...
 
void addChild (WObject *child)
 Adds a child object. More...
 
virtual void removeChild (WObject *child)
 Removes a child object. More...
 
const std::vector< WObject * > & children () const
 Returns the children.
 
WObjectparent () const
 Returns the parent object.
 

Additional Inherited Members

- Public Types inherited from Wt::WValidator
- Public Types inherited from Wt::WObject
typedef void(WObject::* Method) ()
 Typedef for a WObject method without arguments.
 
- Protected Member Functions inherited from Wt::WObject
virtual WStatelessSlot * getStateless (Method method)
 On-demand stateless slot implementation. More...
 
- Static Protected Member Functions inherited from Wt::WObject
static WObjectsender ()
 Returns the sender of the current slot call. More...
 

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.


Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11