Wt: Wt::Auth::EmailTokenResult Class Reference

Wt 3.3.0

- Main Page
- Related Pages
- Modules
- Namespaces
- Classes

- Class List
- Class Hierarchy
- Class Members

Public Types | Public Member Functions
Wt::Auth::EmailTokenResult Class Reference
Authentication module (Wt::Auth)

The result of processing an email-sent token. More...

`#include <Wt/Auth/AuthService>`

List of all members.

## Public Types
enum | Result { Invalid, Expired, UpdatePassword, EmailConfirmed }
| Enumeration that describes the result. More...
## Public Member Functions
| EmailTokenResult (Result result, const User &user=User())
| Constructor.
Result | result () const
| Returns the result.
const User & | user () const
| Returns the user, if any.

## Detailed Description

The result of processing an email-sent token.

An email token can be used for two purposes:

- the user needs to verify his email address by returning a token sent to his supplied email address.
- the user indicates that he lost his email and wants to prove his identity by acknowledging an email to a previously verified email account.

See also:
  AuthService::processEmailToken()
  AuthService::verifyEmailAddress(), AuthService::lostPassword()

## Member Enumeration Documentation

enum Wt::Auth::EmailTokenResult::Result

Enumeration that describes the result.

Enumerator:

  Invalid | The token was invalid.
  Expired | The token has expired.
  UpdatePassword | A token was presented which requires the user to enter a new password. The presented token was a token sent by the AuthService::lostPassword() function. When this is returned as result of AuthService::processEmailToken(), you should present the user with a dialog where he can enter a new password.
  EmailConfirmed | A The token was presented which verifies the email address. The presented token was a token sent by the AuthService::verifyEmailAddress() function. When this is returned as result of processEmailToken(), you can indicate to the user that his email address is now confirmed.

## Constructor & Destructor Documentation

Wt::Auth::EmailTokenResult::EmailTokenResult | ( | Result | result,
|  | const User & | user = `User()`
| ) |  |

Constructor.

Creates an email token result.

## Member Function Documentation

const User & Wt::Auth::EmailTokenResult::user | ( |  | ) | const

Returns the user, if any.

The identified user is only valid when the token result is UpdatePassword or EmailConfirmed. In that case, you may login the user as strongly authenticated since he presented a random token that was sent to his own email address.

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator