Wt  3.3.0
Public Member Functions | Static Public Attributes
Wt::Auth::FormBaseModel Class Reference

A base model class for authentication-related forms. More...

#include <Wt/Auth/FormBaseModel>

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

List of all members.

Public Member Functions

 FormBaseModel (const AuthService &baseAuth, AbstractUserDatabase &users, WObject *parent=0)
 Constructor.
const AuthServicebaseAuth () const
 Returns the authentication base service.
AbstractUserDatabaseusers ()
 Returns the user database.
virtual void addPasswordAuth (const AbstractPasswordService *auth)
 Adds a password authentication service.
const AbstractPasswordServicepasswordAuth () const
 Returns the password authentication service.
virtual void addOAuth (const OAuthService *auth)
 Adds an OAuth authentication service provider.
virtual void addOAuth (const std::vector< const OAuthService * > &auth)
 Adds a list of OAuth authentication service providers.
std::vector< const OAuthService * > oAuth () const
 Returns the list of OAuth authentication service providers.
virtual WString label (Field field) const
 Returns a field label.

Static Public Attributes

static const Field LoginNameField = "user-name"
 Login name field.

Detailed Description

A base model class for authentication-related forms.

This class manages the the auth services and the user database which an authentication model will use to implement a form..


Member Function Documentation

void Wt::Auth::FormBaseModel::addOAuth ( const OAuthService auth) [virtual]

Adds an OAuth authentication service provider.

This enables OAuth-based registration. More than one OAuth authentication service can be configured: one for each supported third-party OAuth identity provider.

See also:
addPasswordAuth()
void Wt::Auth::FormBaseModel::addOAuth ( const std::vector< const OAuthService * > &  auth) [virtual]

Adds a list of OAuth authentication service providers.

See also:
addOAuth()
void Wt::Auth::FormBaseModel::addPasswordAuth ( const AbstractPasswordService auth) [virtual]

Adds a password authentication service.

This enables password-based registration, including choosing a proper password.

Only one password authentication service can be configured.

See also:
addOAuth()
AbstractPasswordService::validatePassword()
const AuthService* Wt::Auth::FormBaseModel::baseAuth ( ) const

Returns the authentication base service.

This returns the service passed through the constructor.

WString Wt::Auth::FormBaseModel::label ( Field  field) const [virtual]

Returns a field label.

The default implementation returns the WString::tr(field)

Reimplemented from Wt::WFormModel.

std::vector<const OAuthService *> Wt::Auth::FormBaseModel::oAuth ( ) const

Returns the list of OAuth authentication service providers.

See also:
addOAuth()
const AbstractPasswordService* Wt::Auth::FormBaseModel::passwordAuth ( ) const

Returns the password authentication service.

See also:
addPasswordAuth()
 All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator

Generated on Mon Apr 8 2013 for the C++ Web Toolkit (Wt) by doxygen 1.7.5.1