‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Controller\MfaSetupController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\MfaSetupController:
TYPO3\CMS\Backend\Controller\AbstractMfaController TYPO3\CMS\Backend\Template\PageRendererBackendSetupTrait

Public Member Functions

 __construct (protected readonly UriBuilder $uriBuilder, protected readonly AuthenticationStyleInformation $authenticationStyleInformation, protected readonly PageRenderer $pageRenderer, protected readonly ExtensionConfiguration $extensionConfiguration, protected readonly LoggerInterface $logger, protected readonly BackendViewFactory $backendViewFactory,)
 
 handleRequest (ServerRequestInterface $request)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Controller\AbstractMfaController
 injectMfaProviderRegistry (MfaProviderRegistry $mfaProviderRegistry)
 

Protected Member Functions

 setupAction (ServerRequestInterface $request)
 
 activateAction (ServerRequestInterface $request)
 
 cancelAction (ServerRequestInterface $request)
 
 renderSelectionView (ServerRequestInterface $request)
 
 renderSetupView (ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider)
 
 initializeView (ServerRequestInterface $request)
 
 addCustomAuthenticationFormStyles ()
 
 isValidIdentifier (string $identifier)
 
 addSuccessMessage (string $mfaProviderTitle)
 
 log (string $message, ?MfaProviderManifestInterface $mfaProvider=null)
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Controller\AbstractMfaController
 isActionAllowed (string $action)
 
 isProviderAllowed (string $identifier)
 
 initializeMfaConfiguration ()
 
 getRecommendedProvider ()
 
 getBackendUser ()
 
 getLanguageService ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Template\PageRendererBackendSetupTrait
 setUpBasicPageRendererForBackend (PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService,)
 
 loadStylesheets (PageRenderer $pageRenderer)
 
 getBackendFavicon (ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request)
 
string getUriForFileName (ServerRequestInterface $request, string $filename)
 
 getNormalizedParams (ServerRequestInterface $request)
 

Protected Attributes

const ACTION_METHOD_MAP
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Controller\AbstractMfaController
MfaProviderRegistry $mfaProviderRegistry
 
array $mfaTsConfig
 
bool $mfaRequired
 
array $allowedProviders
 
array $allowedActions = []
 

Detailed Description

Controller to provide the standalone setup endpoint for multi-factor authentication. This is used when MFA is enforced and a backend user logs in the first time to then set up MFA.

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 49 of file MfaSetupController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\MfaSetupController::__construct ( protected readonly UriBuilder  $uriBuilder,
protected readonly AuthenticationStyleInformation  $authenticationStyleInformation,
protected readonly PageRenderer  $pageRenderer,
protected readonly ExtensionConfiguration  $extensionConfiguration,
protected readonly LoggerInterface  $logger,
protected readonly BackendViewFactory  $backendViewFactory 
)

Definition at line 58 of file MfaSetupController.php.

Member Function Documentation

◆ activateAction()

◆ addCustomAuthenticationFormStyles()

TYPO3\CMS\Backend\Controller\MfaSetupController::addCustomAuthenticationFormStyles ( )
protected

◆ addSuccessMessage()

TYPO3\CMS\Backend\Controller\MfaSetupController::addSuccessMessage ( string  $mfaProviderTitle)
protected

Add a flash message to inform the user about the successful activation of MFA and store this in the session, so it will be shown in the backend after the redirect.

Definition at line 244 of file MfaSetupController.php.

References TYPO3\CMS\Backend\Controller\AbstractMfaController\getLanguageService().

Referenced by TYPO3\CMS\Backend\Controller\MfaSetupController\activateAction().

◆ cancelAction()

TYPO3\CMS\Backend\Controller\MfaSetupController::cancelAction ( ServerRequestInterface  $request)
protected

Allow the user to cancel the multi-factor authentication setup process by calling logoff on the user object, to destroy the session and other already gathered information and finally initiate a redirect back to the login.

Definition at line 150 of file MfaSetupController.php.

References TYPO3\CMS\Backend\Routing\RouteRedirect\createFromRequest(), TYPO3\CMS\Backend\Controller\AbstractMfaController\getBackendUser(), and TYPO3\CMS\Backend\Controller\MfaSetupController\log().

◆ handleRequest()

TYPO3\CMS\Backend\Controller\MfaSetupController::handleRequest ( ServerRequestInterface  $request)

◆ initializeView()

TYPO3\CMS\Backend\Controller\MfaSetupController::initializeView ( ServerRequestInterface  $request)
protected

◆ isValidIdentifier()

TYPO3\CMS\Backend\Controller\MfaSetupController::isValidIdentifier ( string  $identifier)
protected

Extend base identifier check to further evaluate whether the provider is allowed to be a default provider.

Reimplemented from TYPO3\CMS\Backend\Controller\AbstractMfaController.

Definition at line 234 of file MfaSetupController.php.

References TYPO3\CMS\Webhooks\Message\$identifier.

Referenced by TYPO3\CMS\Backend\Controller\MfaSetupController\activateAction(), and TYPO3\CMS\Backend\Controller\MfaSetupController\setupAction().

◆ log()

TYPO3\CMS\Backend\Controller\MfaSetupController::log ( string  $message,
?MfaProviderManifestInterface  $mfaProvider = null 
)
protected

◆ renderSelectionView()

◆ renderSetupView()

◆ setupAction()

TYPO3\CMS\Backend\Controller\MfaSetupController::setupAction ( ServerRequestInterface  $request)
protected

Member Data Documentation

◆ ACTION_METHOD_MAP

const TYPO3\CMS\Backend\Controller\MfaSetupController::ACTION_METHOD_MAP
protected
Initial value:
= [
'setup' => 'GET',
'activate' => 'POST',
'cancel' => 'GET',
]

Definition at line 52 of file MfaSetupController.php.