MfaSetupController extends AbstractMfaController
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.
Table of Contents
Constants
- ACTION_METHOD_MAP = ['setup' => 'GET', 'activate' => 'POST', 'cancel' => 'GET']
 
Properties
- $allowedActions : array<string|int, mixed>
 - $allowedProviders : array<string|int, mixed>
 - $authenticationStyleInformation : AuthenticationStyleInformation
 - $logger : LoggerInterface
 - $mfaProviderRegistry : MfaProviderRegistry
 - $mfaRequired : bool
 - $mfaTsConfig : array<string|int, mixed>
 - $moduleTemplate : ModuleTemplate|null
 - $moduleTemplateFactory : ModuleTemplateFactory
 - $pageRenderer : PageRenderer
 - $uriBuilder : UriBuilder
 
Methods
- __construct() : mixed
 - activateAction() : ResponseInterface
 - Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.
 - cancelAction() : ResponseInterface
 - 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.
 - handleRequest() : ResponseInterface
 - Main action for handling the request and returning the response
 - setupAction() : ResponseInterface
 - 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.
 - addCustomAuthenticationFormStyles() : void
 - addSuccessMessage() : void
 - 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.
 - getBackendUser() : BackendUserAuthentication
 - getLanguageService() : LanguageService
 - getRecommendedProvider() : MfaProviderManifestInterface|null
 - Get the recommended provider
 - initializeMfaConfiguration() : void
 - Initialize MFA configuration based on TSconfig and global configuration
 - initializeView() : StandaloneView
 - Initialize the standalone view by setting the paths and assigning view variables
 - isActionAllowed() : bool
 - isProviderAllowed() : bool
 - isValidIdentifier() : bool
 - Extend base identifier check to further evaluate whether the provider is allowed to be a default provider.
 - log() : void
 - Log debug information for MFA setup events
 - renderSelectionView() : string
 - Allow the user - required to set up MFA - to select between all available providers
 - renderSetupView() : string
 - Render form to setup a provider by using provider specific content
 
Constants
ACTION_METHOD_MAP
    protected
        mixed
    ACTION_METHOD_MAP
    = ['setup' => 'GET', 'activate' => 'POST', 'cancel' => 'GET']
    
    
    
    
Properties
$allowedActions
        protected
            array<string|int, mixed>
    $allowedActions
     = []
    
    
    
    
    
$allowedProviders
        protected
            array<string|int, mixed>
    $allowedProviders
    
    
    
    
    
    
$authenticationStyleInformation
        protected
            AuthenticationStyleInformation
    $authenticationStyleInformation
    
    
    
    
    
    
$logger
        protected
            LoggerInterface
    $logger
    
    
    
    
    
    
$mfaProviderRegistry
        protected
            MfaProviderRegistry
    $mfaProviderRegistry
    
    
    
    
    
    
$mfaRequired
        protected
            bool
    $mfaRequired
    
    
    
    
    
    
$mfaTsConfig
        protected
            array<string|int, mixed>
    $mfaTsConfig
    
    
    
    
    
    
$moduleTemplate
        protected
            ModuleTemplate|null
    $moduleTemplate
    
    
    
    
    
    
$moduleTemplateFactory
        protected
            ModuleTemplateFactory
    $moduleTemplateFactory
    
    
    
    
    
    
$pageRenderer
        protected
            PageRenderer
    $pageRenderer
    
    
    
    
    
    
$uriBuilder
        protected
            UriBuilder
    $uriBuilder
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(UriBuilder $uriBuilder, MfaProviderRegistry $mfaProviderRegistry, ModuleTemplateFactory $moduleTemplateFactory, AuthenticationStyleInformation $authenticationStyleInformation, PageRenderer $pageRenderer, LoggerInterface $logger) : mixed
    Parameters
- $uriBuilder : UriBuilder
 - $mfaProviderRegistry : MfaProviderRegistry
 - $moduleTemplateFactory : ModuleTemplateFactory
 - $authenticationStyleInformation : AuthenticationStyleInformation
 - $pageRenderer : PageRenderer
 - $logger : LoggerInterface
 
activateAction()
Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.
    public
                    activateAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacecancelAction()
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.
    public
                    cancelAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacehandleRequest()
Main action for handling the request and returning the response
    public
                    handleRequest(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfacesetupAction()
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.
    public
                    setupAction(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfaceaddCustomAuthenticationFormStyles()
    protected
                    addCustomAuthenticationFormStyles() : void
    addSuccessMessage()
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.
    protected
                    addSuccessMessage(string $mfaProviderTitle) : void
    Parameters
- $mfaProviderTitle : string
 
getBackendUser()
    protected
                    getBackendUser() : BackendUserAuthentication
    Return values
BackendUserAuthenticationgetLanguageService()
    protected
                    getLanguageService() : LanguageService
    Return values
LanguageServicegetRecommendedProvider()
Get the recommended provider
    protected
                    getRecommendedProvider() : MfaProviderManifestInterface|null
    Return values
MfaProviderManifestInterface|nullinitializeMfaConfiguration()
Initialize MFA configuration based on TSconfig and global configuration
    protected
                    initializeMfaConfiguration() : void
    initializeView()
Initialize the standalone view by setting the paths and assigning view variables
    protected
                    initializeView(ServerRequestInterface $request, string $templateName) : StandaloneView
    Parameters
- $request : ServerRequestInterface
 - $templateName : string
 
Return values
StandaloneViewisActionAllowed()
    protected
                    isActionAllowed(string $action) : bool
    Parameters
- $action : string
 
Return values
boolisProviderAllowed()
    protected
                    isProviderAllowed(string $identifier) : bool
    Parameters
- $identifier : string
 
Return values
boolisValidIdentifier()
Extend base identifier check to further evaluate whether the provider is allowed to be a default provider.
    protected
                    isValidIdentifier(string $identifier) : bool
    Parameters
- $identifier : string
 
Return values
boollog()
Log debug information for MFA setup events
    protected
                    log(string $message[, MfaProviderManifestInterface|null $mfaProvider = null ]) : void
    Parameters
- $message : string
 - $mfaProvider : MfaProviderManifestInterface|null = null
 
renderSelectionView()
Allow the user - required to set up MFA - to select between all available providers
    protected
                    renderSelectionView(ServerRequestInterface $request) : string
    Parameters
- $request : ServerRequestInterface
 
Return values
stringrenderSetupView()
Render form to setup a provider by using provider specific content
    protected
                    renderSetupView(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : string
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface