Wt
3.2.0
|
Helper class for creating a form to let a user enter his password. More...
#include <Wt/Auth/EnterPasswordFields>
Public Member Functions | |
EnterPasswordFields (const AbstractPasswordService &auth, WLineEdit *password, WText *passwordInfo, WPushButton *okButton, WObject *parent=0) | |
Constructor. | |
bool | validate (const User &user) |
Validates the entered password. |
Helper class for creating a form to let a user enter his password.
This class implements the process of letting the user enter his password. It also implements attempt throttling.
Wt::Auth::EnterPasswordFields::EnterPasswordFields | ( | const AbstractPasswordService & | auth, |
WLineEdit * | password, | ||
WText * | passwordInfo, | ||
WPushButton * | okButton, | ||
WObject * | parent = 0 |
||
) |
Constructor.
The object uses a password entry field, a feed-back text field (for error feed-back and/or help text), and optionally also manipulates the "login"/"ok" button to indicate that attempts are currently refused because of password attempt throttling.
bool Wt::Auth::EnterPasswordFields::validate | ( | const User & | user | ) |
Validates the entered password.
This validates the entered password, and provides the necessary feed-back in the info field and ok button.
Returns whether the entered password is valid.