Wt  4.10.4
Loading...
Searching...
No Matches
Wt::Auth::EmailTokenResult Class Reference

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

#include <Wt/Auth/AuthService.h>

Public Types

typedef EmailTokenState State
 Typedef for enum Wt::Auth::EmailTokenState.
 

Public Member Functions

 EmailTokenResult (EmailTokenState state, const User &user=User())
 Constructor.
 
EmailTokenState state () const
 Returns the result.
 
const Useruser () 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()

Constructor & Destructor Documentation

◆ EmailTokenResult()

Wt::Auth::EmailTokenResult::EmailTokenResult ( EmailTokenState state,
const User & user = User() )

Constructor.

Creates an email token result.

Member Function Documentation

◆ user()

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

Returns the user, if any.

The identified user is only valid when the token state 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.