Wt  4.11.1
Public Member Functions | List of all members
Wt::Auth::Mfa::AuthenticationResult Class Reference

A class that holds an authentication result. More...

#include <AbstractMfaProcess.h>

Public Member Functions

 AuthenticationResult ()
 Default constructor. More...
 
 AuthenticationResult (AuthenticationStatus state, const WString &message)
 Constructor. More...
 
 AuthenticationResult (AuthenticationStatus status)
 Constructor. More...
 
AuthenticationStatus status () const
 Returns the authentication status.
 
const WStringmessage () const
 Returns the authentication message.
 

Detailed Description

A class that holds an authentication result.

This class in essence is a record of an authentication attempt. The AuthenticationStatus will indicate whether the event was successful or not, and the optional string provides a way to customize a message. This can be used to display more detailed information to the user, or allow the developer to log some information.

By default this signal is used in TotpProcess::processEnvironment(). There it is fired upon successfully matching the TOTP code and finding a matching environment token (Http::Cookie) against the database respectively.

Constructor & Destructor Documentation

◆ AuthenticationResult() [1/3]

Wt::Auth::Mfa::AuthenticationResult::AuthenticationResult ( )

Default constructor.

Creates an invalid result.

◆ AuthenticationResult() [2/3]

Wt::Auth::Mfa::AuthenticationResult::AuthenticationResult ( AuthenticationStatus  state,
const WString message 
)

Constructor.

Creates a result with given status and message.

◆ AuthenticationResult() [3/3]

Wt::Auth::Mfa::AuthenticationResult::AuthenticationResult ( AuthenticationStatus  status)
explicit

Constructor.

Creates a result with given status and an empty message.