Wt  3.3.8
Public Types | Public Member Functions | List of all members
Wt::Auth::EmailTokenResult Class Reference

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

#include <Wt/Auth/AuthService>

Public Types

Public Member Functions

 EmailTokenResult (Result result, const User &user=User())
 Constructor. More...
 
Result result () const
 Returns the result.
 
const Useruser () const
 Returns the user, if any. More...
 

Detailed Description

The result of processing an email-sent token.

An email token can be used for two purposes:

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

Member Enumeration Documentation

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.


Generated on Mon Sep 4 2017 for the C++ Web Toolkit (Wt) by doxygen 1.8.11