‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Controller\MfaSetupController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\MfaSetupController:
TYPO3\CMS\Backend\Controller\AbstractMfaController

Public Member Functions

 __construct (UriBuilder $uriBuilder, MfaProviderRegistry $mfaProviderRegistry, ModuleTemplateFactory $moduleTemplateFactory, AuthenticationStyleInformation $authenticationStyleInformation, PageRenderer $pageRenderer, LoggerInterface $logger)
 
 handleRequest (ServerRequestInterface $request)
 
 setupAction (ServerRequestInterface $request)
 
 activateAction (ServerRequestInterface $request)
 
 cancelAction (ServerRequestInterface $request)
 
- ‪Public Member Functions inherited from ‪TYPO3\CMS\Backend\Controller\AbstractMfaController
 __construct (UriBuilder $uriBuilder, MfaProviderRegistry $mfaProviderRegistry, ModuleTemplateFactory $moduleTemplateFactory)
 

Protected Member Functions

 renderSelectionView (ServerRequestInterface $request)
 
 renderSetupView (ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider)
 
 initializeView (ServerRequestInterface $request, string $templateName)
 
 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 Attributes

const ACTION_METHOD_MAP
 
AuthenticationStyleInformation $authenticationStyleInformation
 
PageRenderer $pageRenderer
 
LoggerInterface $logger
 
- ‪Protected Attributes inherited from ‪TYPO3\CMS\Backend\Controller\AbstractMfaController
UriBuilder $uriBuilder
 
MfaProviderRegistry $mfaProviderRegistry
 
ModuleTemplateFactory $moduleTemplateFactory
 
ModuleTemplate $moduleTemplate
 
array $mfaTsConfig
 
bool $mfaRequired
 
array $allowedProviders
 
array $allowedActions = []
 

Detailed Description

Controller to provide the standalone setup endpoint for multi-factor authentication

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

Definition at line 45 of file MfaSetupController.php.

Constructor & Destructor Documentation

◆ __construct()

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 246 of file MfaSetupController.php.

References TYPO3\CMS\Backend\Controller\AbstractMfaController\getLanguageService(), and TYPO3\CMS\Core\Messaging\AbstractMessage\OK.

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

◆ cancelAction()

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

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 156 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)

Main action for handling the request and returning the response

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

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

Definition at line 71 of file MfaSetupController.php.

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

◆ initializeView()

TYPO3\CMS\Backend\Controller\MfaSetupController::initializeView ( ServerRequestInterface  $request,
string  $templateName 
)
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 236 of file MfaSetupController.php.

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()

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

Allow the user - required to set up MFA - to select between all available providers

Definition at line 166 of file MfaSetupController.php.

References TYPO3\CMS\Backend\Controller\AbstractMfaController\getRecommendedProvider(), and TYPO3\CMS\Backend\Controller\MfaSetupController\initializeView().

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

◆ renderSetupView()

◆ setupAction()

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

Render form to setup a provider by using provider specific content. Fall back to provider selection view, in case no valid provider was yet selected.

Definition at line 99 of file MfaSetupController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\MfaSetupController\isValidIdentifier(), TYPO3\CMS\Backend\Controller\MfaSetupController\log(), TYPO3\CMS\Backend\Controller\MfaSetupController\renderSelectionView(), and TYPO3\CMS\Backend\Controller\MfaSetupController\renderSetupView().

Member Data Documentation

◆ $authenticationStyleInformation

AuthenticationStyleInformation TYPO3\CMS\Backend\Controller\MfaSetupController::$authenticationStyleInformation
protected

◆ $logger

LoggerInterface TYPO3\CMS\Backend\Controller\MfaSetupController::$logger
protected

◆ $pageRenderer

PageRenderer TYPO3\CMS\Backend\Controller\MfaSetupController::$pageRenderer
protected

◆ ACTION_METHOD_MAP

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

Definition at line 47 of file MfaSetupController.php.