MfaConfigurationController extends AbstractMfaController
Controller to configure MFA providers in the backend
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Table of Contents
Properties
- $allowedActions : array<string|int, mixed>
 - $allowedProviders : array<string|int, mixed>
 - $iconFactory : IconFactory
 - $mfaProviderRegistry : MfaProviderRegistry
 - $mfaRequired : bool
 - $mfaTsConfig : array<string|int, mixed>
 - $moduleTemplate : ModuleTemplate|null
 - $moduleTemplateFactory : ModuleTemplateFactory
 - $uriBuilder : UriBuilder
 
Methods
- __construct() : mixed
 - activateAction() : ResponseInterface
 - Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.
 - deactivateAction() : ResponseInterface
 - Handle deactivate request by forwarding the request to the appropriate provider. Also remove the provider as default provider from user UC, if set.
 - editAction() : ResponseInterface
 - Render form to edit a provider by using provider specific content
 - handleRequest() : ResponseInterface
 - Main entry point, checking prerequisite, initializing and setting up the view and finally dispatching to the requested action.
 - overviewAction() : ResponseInterface
 - Setup the overview with all available MFA providers
 - saveAction() : ResponseInterface
 - Handle save request, receiving from the edit view by forwarding the request to the appropriate provider.
 - setupAction() : ResponseInterface
 - Render form to setup a provider by using provider specific content
 - unlockAction() : ResponseInterface
 - Handle unlock request by forwarding the request to the appropriate provider
 - addFlashMessage() : void
 - addFormButtons() : void
 - addOverviewButtons() : void
 - getActionUri() : UriInterface
 - Build a uri for the current controller based on the given action, respecting additional parameters.
 - getBackendUser() : BackendUserAuthentication
 - getDefaultProviderIdentifier() : string
 - Get the default provider
 - getLanguageService() : LanguageService
 - getRecommendedProvider() : MfaProviderManifestInterface|null
 - Get the recommended provider
 - getRecommendedProviderIdentifier() : string
 - Get the recommended provider
 - getReturnUrl() : string
 - hasSuitableDefaultProviders() : bool
 - Check if there are more suitable default providers for the current user
 - initializeMfaConfiguration() : void
 - Initialize MFA configuration based on TSconfig and global configuration
 - initializeView() : StandaloneView
 - Initialize the standalone view and set the template name
 - isActionAllowed() : bool
 - isDefaultProvider() : bool
 - isProviderAllowed() : bool
 - isValidIdentifier() : bool
 - removeDefaultProvider() : void
 - setDefaultProvider() : void
 
Properties
$allowedActions
        protected
            array<string|int, mixed>
    $allowedActions
     = ['overview', 'setup', 'activate', 'deactivate', 'unlock', 'edit', 'save']
    
    
    
    
    
$allowedProviders
        protected
            array<string|int, mixed>
    $allowedProviders
    
    
    
    
    
    
$iconFactory
        protected
            IconFactory
    $iconFactory
    
    
    
    
    
    
$mfaProviderRegistry
        protected
            MfaProviderRegistry
    $mfaProviderRegistry
    
    
    
    
    
    
$mfaRequired
        protected
            bool
    $mfaRequired
    
    
    
    
    
    
$mfaTsConfig
        protected
            array<string|int, mixed>
    $mfaTsConfig
    
    
    
    
    
    
$moduleTemplate
        protected
            ModuleTemplate|null
    $moduleTemplate
    
    
    
    
    
    
$moduleTemplateFactory
        protected
            ModuleTemplateFactory
    $moduleTemplateFactory
    
    
    
    
    
    
$uriBuilder
        protected
            UriBuilder
    $uriBuilder
    
    
    
    
    
    
Methods
__construct()
    public
                    __construct(IconFactory $iconFactory, UriBuilder $uriBuilder, MfaProviderRegistry $mfaProviderRegistry, ModuleTemplateFactory $moduleTemplateFactory) : mixed
    Parameters
- $iconFactory : IconFactory
 - $uriBuilder : UriBuilder
 - $mfaProviderRegistry : MfaProviderRegistry
 - $moduleTemplateFactory : ModuleTemplateFactory
 
activateAction()
Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.
    public
                    activateAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface
    Furthermore, add the provider as default provider in case it is the recommended provider for this user, or no default provider is yet defined the newly activated provider is allowed to be a default provider and there are no other providers which would suite as default provider.
Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 
Return values
ResponseInterfacedeactivateAction()
Handle deactivate request by forwarding the request to the appropriate provider. Also remove the provider as default provider from user UC, if set.
    public
                    deactivateAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 
Return values
ResponseInterfaceeditAction()
Render form to edit a provider by using provider specific content
    public
                    editAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider, StandaloneView $view) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 - $view : StandaloneView
 
Return values
ResponseInterfacehandleRequest()
Main entry point, checking prerequisite, initializing and setting up the view and finally dispatching to the requested action.
    public
                    handleRequest(ServerRequestInterface $request) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 
Return values
ResponseInterfaceoverviewAction()
Setup the overview with all available MFA providers
    public
                    overviewAction(ServerRequestInterface $request, StandaloneView $view) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $view : StandaloneView
 
Return values
ResponseInterfacesaveAction()
Handle save request, receiving from the edit view by forwarding the request to the appropriate provider.
    public
                    saveAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 
Return values
ResponseInterfacesetupAction()
Render form to setup a provider by using provider specific content
    public
                    setupAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider, StandaloneView $view) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 - $view : StandaloneView
 
Return values
ResponseInterfaceunlockAction()
Handle unlock request by forwarding the request to the appropriate provider
    public
                    unlockAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface
    Parameters
- $request : ServerRequestInterface
 - $mfaProvider : MfaProviderManifestInterface
 
Return values
ResponseInterfaceaddFlashMessage()
    protected
                    addFlashMessage(string $message[, string $title = '' ][, int $severity = FlashMessage::INFO ]) : void
    Parameters
- $message : string
 - $title : string = ''
 - $severity : int = FlashMessage::INFO
 
addFormButtons()
    protected
                    addFormButtons() : void
    addOverviewButtons()
    protected
                    addOverviewButtons(ServerRequestInterface $request) : void
    Parameters
- $request : ServerRequestInterface
 
getActionUri()
Build a uri for the current controller based on the given action, respecting additional parameters.
    protected
                    getActionUri(string $action[, array<string|int, mixed> $additionalParameters = [] ]) : UriInterface
    Parameters
- $action : string
 - $additionalParameters : array<string|int, mixed> = []
 
Return values
UriInterfacegetBackendUser()
    protected
                    getBackendUser() : BackendUserAuthentication
    Return values
BackendUserAuthenticationgetDefaultProviderIdentifier()
Get the default provider
    protected
                    getDefaultProviderIdentifier() : string
    Return values
stringgetLanguageService()
    protected
                    getLanguageService() : LanguageService
    Return values
LanguageServicegetRecommendedProvider()
Get the recommended provider
    protected
                    getRecommendedProvider() : MfaProviderManifestInterface|null
    Return values
MfaProviderManifestInterface|nullgetRecommendedProviderIdentifier()
Get the recommended provider
    protected
                    getRecommendedProviderIdentifier() : string
    Return values
stringgetReturnUrl()
    protected
                    getReturnUrl(ServerRequestInterface $request) : string
    Parameters
- $request : ServerRequestInterface
 
Return values
stringhasSuitableDefaultProviders()
Check if there are more suitable default providers for the current user
    protected
                    hasSuitableDefaultProviders([array<string|int, mixed> $excludedProviders = [] ]) : bool
    Parameters
- $excludedProviders : array<string|int, mixed> = []
 
Return values
boolinitializeMfaConfiguration()
Initialize MFA configuration based on TSconfig and global configuration
    protected
                    initializeMfaConfiguration() : void
    initializeView()
Initialize the standalone view and set the template name
    protected
                    initializeView(string $templateName) : StandaloneView
    Parameters
- $templateName : string
 
Return values
StandaloneViewisActionAllowed()
    protected
                    isActionAllowed(string $action) : bool
    Parameters
- $action : string
 
Return values
boolisDefaultProvider()
    protected
                    isDefaultProvider(MfaProviderManifestInterface $mfaProvider) : bool
    Parameters
- $mfaProvider : MfaProviderManifestInterface
 
Return values
boolisProviderAllowed()
    protected
                    isProviderAllowed(string $identifier) : bool
    Parameters
- $identifier : string
 
Return values
boolisValidIdentifier()
    protected
                    isValidIdentifier(string $identifier) : bool
    Parameters
- $identifier : string
 
Return values
boolremoveDefaultProvider()
    protected
                    removeDefaultProvider() : void
    setDefaultProvider()
    protected
                    setDefaultProvider(MfaProviderManifestInterface $mfaProvider) : void
    Parameters
- $mfaProvider : MfaProviderManifestInterface