Wt
3.2.1
|
A base model class for authentication-related forms. More...
#include <Wt/Auth/FormBaseModel>
Public Member Functions | |
FormBaseModel (const AuthService &baseAuth, AbstractUserDatabase &users, WObject *parent=0) | |
Constructor. | |
const AuthService * | baseAuth () const |
Returns the authentication base service. | |
AbstractUserDatabase & | users () |
Returns the user database. | |
virtual void | addPasswordAuth (const AbstractPasswordService *auth) |
Adds a password authentication service. | |
const AbstractPasswordService * | passwordAuth () 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. |
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..
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.
void Wt::Auth::FormBaseModel::addOAuth | ( | const std::vector< const OAuthService * > & | auth | ) | [virtual] |
Adds a list of OAuth authentication service providers.
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.
const AuthService* Wt::Auth::FormBaseModel::baseAuth | ( | ) | const |
Returns the authentication base service.
This returns the service passed through the constructor.
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.
const AbstractPasswordService* Wt::Auth::FormBaseModel::passwordAuth | ( | ) | const |
Returns the password authentication service.