Wt  3.2.0
Classes | Public Member Functions
Wt::Auth::AbstractPasswordService Class Reference

Abstract password authentication service. More...

#include <Wt/Auth/AbstractPasswordService>

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

List of all members.

Classes

class  AbstractStrengthValidator
 Validator for password strength. More...

Public Member Functions

virtual ~AbstractPasswordService ()
 Destructor.
virtual const AuthServicebaseAuth () const =0
 Returns the basic authentication service.
virtual bool attemptThrottlingEnabled () const =0
 Returns whether password attempt throttling is enabled.
virtual AbstractStrengthValidatorstrengthValidator () const =0
 Returns a validator which checks that a password is strong enough.
virtual int delayForNextAttempt (const User &user) const =0
 Returns the delay for this user for a next authentication attempt.
virtual PasswordResult verifyPassword (const User &user, const WString &password) const =0
 Verifies a password for a given user.
virtual void updatePassword (const User &user, const WString &password) const =0
 Sets a new password for the given user.

Detailed Description

Abstract password authentication service.

This abstract class defines the interface for password authentication.

It provides methods to verify a password, to update a password, and to throttle password verification attempts.

See also:
PasswordService a default implementation

Member Function Documentation

virtual int Wt::Auth::AbstractPasswordService::delayForNextAttempt ( const User user) const [pure virtual]

Returns the delay for this user for a next authentication attempt.

If password attempt throttling is enabled, then this returns the number of seconds this user must wait for a new authentication attempt, presumably because of a number of failed attempts.

See also:
attemptThrottlingEnabled()

Implemented in Wt::Auth::PasswordService.

virtual void Wt::Auth::AbstractPasswordService::updatePassword ( const User user,
const WString password 
) const [pure virtual]

Sets a new password for the given user.

This stores a new password for the user in the database.

Implemented in Wt::Auth::PasswordService.

virtual PasswordResult Wt::Auth::AbstractPasswordService::verifyPassword ( const User user,
const WString password 
) const [pure virtual]

Verifies a password for a given user.

The supplied password is verified against the user's credentials stored in the database. If password account throttling is enabled, it may also refuse an authentication attempt.

See also:
setVerifier(), setAttemptThrottlingEnabled()

Implemented in Wt::Auth::PasswordService.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator

Generated on Tue Nov 29 2011 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1