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

Public Member Functions

 __construct (protected readonly Context $context, protected readonly HashService $hashService)
 
 canProcess (ServerRequestInterface $request)
 
 isActive (MfaProviderPropertyManager $propertyManager)
 
 isLocked (MfaProviderPropertyManager $propertyManager)
 
 verify (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 activate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 update (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 unlock (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 deactivate (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager)
 
 handleRequest (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, MfaViewType $type)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderInterface
 handleRequest (ServerRequestInterface $request, MfaProviderPropertyManager $propertyManager, MfaViewType $type)
 

Protected Member Functions

 prepareSetupView (StandaloneView $view, MfaProviderPropertyManager $propertyManager)
 
 prepareEditView (StandaloneView $view, MfaProviderPropertyManager $propertyManager)
 
 prepareAuthView (StandaloneView $view, MfaProviderPropertyManager $propertyManager)
 
 getTotp (ServerRequestInterface $request)
 
 getSvgQrCode (string $content)
 
 getDateTime (int $timestamp)
 

Private Attributes

const MAX_ATTEMPTS = 3
 

Detailed Description

MFA provider for time-based one-time password authentication

should only be used by the TYPO3 Core

Definition at line 40 of file TotpProvider.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::__construct ( protected readonly Context  $context,
protected readonly HashService  $hashService 
)

Definition at line 44 of file TotpProvider.php.

Member Function Documentation

◆ activate()

◆ canProcess()

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

◆ deactivate()

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

Handle the deactivate action. For security reasons, the provider entry is completely deleted and setting up this provider again, will therefore create a brand new entry.

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

Definition at line 182 of file TotpProvider.php.

References TYPO3\CMS\Core\Authentication\Mfa\MfaProviderPropertyManager\deleteProviderEntry(), and TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider\isActive().

◆ getDateTime()

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

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

Definition at line 288 of file TotpProvider.php.

References $GLOBALS.

◆ getSvgQrCode()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::getSvgQrCode ( string  $content)
protected

Internal helper method for generating a svg QR-code for TOTP applications

Definition at line 275 of file TotpProvider.php.

Referenced by TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider\prepareSetupView().

◆ getTotp()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::getTotp ( ServerRequestInterface  $request)
protected

Internal helper method for fetching the TOTP from the request

Definition at line 267 of file TotpProvider.php.

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

◆ handleRequest()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::handleRequest ( ServerRequestInterface  $request,
MfaProviderPropertyManager  $propertyManager,
MfaViewType  $type 
)

◆ isActive()

◆ isLocked()

◆ prepareAuthView()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::prepareAuthView ( StandaloneView  $view,
MfaProviderPropertyManager  $propertyManager 
)
protected

◆ prepareEditView()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::prepareEditView ( StandaloneView  $view,
MfaProviderPropertyManager  $propertyManager 
)
protected

◆ prepareSetupView()

TYPO3\CMS\Core\Authentication\Mfa\Provider\TotpProvider::prepareSetupView ( StandaloneView  $view,
MfaProviderPropertyManager  $propertyManager 
)
protected

◆ unlock()

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

◆ update()

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

◆ verify()

Member Data Documentation

◆ MAX_ATTEMPTS

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