‪TYPO3CMS  11.5
TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider Class Reference
Inheritance diagram for TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider:
TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface

Public Member Functions

 __construct (MfaProviderRegistry $mfaProviderRegistry, Context $context, UriBuilder $uriBuilder, FlashMessageService $flashMessageService)
 
bool canProcess (ServerRequestInterface $request)
 
bool isActive (MfaProviderPropertyManager $propertyManager)
 
bool isLocked (MfaProviderPropertyManager $propertyManager)
 
bool verify (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
ResponseInterface handleRequest (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, string $type)
 
bool activate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
bool deactivate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
bool unlock (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 update (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 

Protected Member Functions

bool activeProvidersExist (MfaProviderPropertyManager $currentPropertyManager)
 
string getRecoveryCode (ServerRequestInterface $request)
 
string getMode (MfaProviderPropertyManager $propertyManager)
 
 addFlashMessage (string $message, string $title='', int $severity=FlashMessage::INFO)
 
string getDateTime (int $timestamp)
 
 getLanguageService ()
 

Protected Attributes

MfaProviderRegistry $mfaProviderRegistry
 
Context $context
 
UriBuilder $uriBuilder
 
FlashMessageService $flashMessageService
 

Private Attributes

const MAX_ATTEMPTS = 3
 

Detailed Description

MFA provider for authentication with recovery codes

should only be used by the TYPO3 Core

Definition at line 42 of file RecoveryCodesProvider.php.

Constructor & Destructor Documentation

◆ __construct()

Member Function Documentation

◆ activate()

◆ activeProvidersExist()

◆ addFlashMessage()

TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::addFlashMessage ( string  $message,
string  $title = '',
int  $severity = FlashMessage::INFO 
)
protected

Add a custom flash message for this provider Note: The flash messages added by the main controller are still shown to the user.

Parameters
string$message
string$title
int$severity

Definition at line 393 of file RecoveryCodesProvider.php.

Referenced by TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\handleRequest(), TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\unlock(), and TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\update().

◆ canProcess()

bool TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::canProcess ( ServerRequestInterface  $request)

Check if a recovery code is given in the current request

Parameters
ServerRequestInterface$request
Returns
‪bool

Implements TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface.

Definition at line 69 of file RecoveryCodesProvider.php.

References TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\getRecoveryCode().

◆ deactivate()

bool TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::deactivate ( ServerRequestInterface  $request,
MfaProviderPropertyManager  $propertyManager 
)

Handle the deactivate action by removing the provider entry

Parameters
ServerRequestInterface$request
MfaProviderPropertyManager$propertyManager
Returns
‪bool

Implements TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface.

Definition at line 250 of file RecoveryCodesProvider.php.

References TYPO3\CMS\Core\Authentication\Mfa\MfaProviderPropertyManager\deleteProviderEntry(), and TYPO3\CMS\Core\Authentication\Mfa\MfaProviderPropertyManager\getProperty().

◆ getDateTime()

string TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::getDateTime ( int  $timestamp)
protected

Return the timestamp as local time (date string) by applying the globally configured format

Parameters
int$timestamp
Returns
‪string

Definition at line 406 of file RecoveryCodesProvider.php.

References $GLOBALS.

◆ getLanguageService()

◆ getMode()

◆ getRecoveryCode()

string TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::getRecoveryCode ( ServerRequestInterface  $request)
protected

Internal helper method for fetching the recovery code from the request

Parameters
ServerRequestInterface$request
Returns
‪string

Definition at line 369 of file RecoveryCodesProvider.php.

Referenced by TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\canProcess(), and TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider\verify().

◆ handleRequest()

◆ isActive()

bool TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::isActive ( MfaProviderPropertyManager  $propertyManager)

◆ isLocked()

bool TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::isLocked ( MfaProviderPropertyManager  $propertyManager)

◆ unlock()

◆ update()

◆ verify()

Member Data Documentation

◆ $context

Context TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::$context
protected

◆ $flashMessageService

FlashMessageService TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::$flashMessageService
protected

◆ $mfaProviderRegistry

MfaProviderRegistry TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::$mfaProviderRegistry
protected

◆ $uriBuilder

UriBuilder TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::$uriBuilder
protected

◆ MAX_ATTEMPTS

const TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::MAX_ATTEMPTS = 3
private

Definition at line 61 of file RecoveryCodesProvider.php.