Wt  3.7.1
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

enum  Result { Invalid, Expired, UpdatePassword, EmailConfirmed }
 Enumeration that describes the result. More...
 

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

◆ 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

◆ EmailTokenResult()

Wt::Auth::EmailTokenResult::EmailTokenResult ( Result  result,
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 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 Tue Dec 15 2020 for the C++ Web Toolkit (Wt) by doxygen 1.8.13