‪TYPO3CMS  ‪main
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 (protected readonly MfaProviderRegistry $mfaProviderRegistry, protected readonly Context $context, protected readonly UriBuilder $uriBuilder, protected readonly FlashMessageService $flashMessageService, protected readonly HashService $hashService,)
 
 canProcess (ServerRequestInterface $request)
 
 isActive (MfaProviderPropertyManager $propertyManager)
 
 isLocked (MfaProviderPropertyManager $propertyManager)
 
 verify (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 handleRequest (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, MfaViewType $type)
 
 activate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 deactivate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 unlock (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 update (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface
 handleRequest (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, MfaViewType $type)
 

Protected Member Functions

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

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 44 of file RecoveryCodesProvider.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::__construct ( protected readonly MfaProviderRegistry  $mfaProviderRegistry,
protected readonly Context  $context,
protected readonly UriBuilder  $uriBuilder,
protected readonly FlashMessageService  $flashMessageService,
protected readonly HashService  $hashService 
)

Definition at line 46 of file RecoveryCodesProvider.php.

Member Function Documentation

◆ activate()

◆ activeProvidersExist()

◆ addFlashMessage()

TYPO3\CMS\Core\Authentication\Mfa\Provider\RecoveryCodesProvider::addFlashMessage ( string  $message,
string  $title = '',
ContextualFeedbackSeverity  $severity = ContextualFeedbackSeverity::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.

Definition at line 343 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()

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

Check if a recovery code is given in the current request

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

Definition at line 59 of file RecoveryCodesProvider.php.

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

◆ deactivate()

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

◆ getDateTime()

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

Definition at line 353 of file RecoveryCodesProvider.php.

References $GLOBALS.

◆ getLanguageService()

◆ getMode()

◆ getRecoveryCode()

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

Internal helper method for fetching the recovery code from the request

Definition at line 326 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()

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

◆ isLocked()

◆ unlock()

◆ update()

◆ verify()

Member Data Documentation

◆ MAX_ATTEMPTS

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

Definition at line 54 of file RecoveryCodesProvider.php.