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

Abstract password authentication service. More...

#include <Wt/Auth/AbstractPasswordService>

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

Classes

class  AbstractStrengthValidator
 Validator for password strength. More...
 
class  StrengthValidatorResult
 Result returned when validating 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. More...
 
virtual PasswordResult verifyPassword (const User &user, const WString &password) const =0
 Verifies a password for a given user. More...
 
virtual void updatePassword (const User &user, const WString &password) const =0
 Sets a new password for the given user. More...
 

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.


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