MfaConfigurationController

class \TYPO3\CMS\Backend\Controller\MfaConfigurationController

Extends
AbstractMfaController

Controller to configure MFA providers in the backend

Attributes

#[AsController]

Table of Contents

Properties

$allowedActions  : array
$allowedProviders  : array
$iconFactory  : IconFactory
$mfaProviderRegistry  : MfaProviderRegistry
$mfaRequired  : bool
$mfaTsConfig  : array
$moduleTemplateFactory  : ModuleTemplateFactory
$uriBuilder  : UriBuilder
$view  : ModuleTemplate

Methods

__construct()  : mixed
handleRequest()  : ResponseInterface
Main entry point, checking prerequisite, initializing and setting up the view and finally dispatching to the requested action.
injectMfaProviderRegistry()  : void
activateAction()  : ResponseInterface
Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.
addFlashMessage()  : void
addFormButtons()  : void
addOverviewButtons()  : void
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
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
isActionAllowed()  : bool
isDefaultProvider()  : bool
isProviderAllowed()  : bool
isValidIdentifier()  : bool
overviewAction()  : ResponseInterface
Setup the overview with all available MFA providers
removeDefaultProvider()  : void
saveAction()  : ResponseInterface
Handle save request, receiving from the edit view by forwarding the request to the appropriate provider.
setDefaultProvider()  : void
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

Properties

$allowedActions

protected array $allowedActions = ['overview', 'setup', 'activate', 'deactivate', 'unlock', 'edit', 'save']

$allowedProviders

protected array $allowedProviders

Methods

handleRequest()

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

ResponseInterface

activateAction()

Handle activate request, receiving from the setup view by forwarding the request to the appropriate provider.

protected 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

ResponseInterface

addFormButtons()

protected addFormButtons() : void

addOverviewButtons()

protected addOverviewButtons(ServerRequestInterface $request) : void

Parameters

$request : ServerRequestInterface

deactivateAction()

Handle deactivate request by forwarding the request to the appropriate provider. Also remove the provider as default provider from user UC, if set.

protected deactivateAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface

Parameters

$request : ServerRequestInterface
$mfaProvider : MfaProviderManifestInterface

Return values

ResponseInterface

getActionUri()

Build a uri for the current controller based on the given action, respecting additional parameters.

protected getActionUri(string $action[, array $additionalParameters = [] ]) : UriInterface

Parameters

$action : string
$additionalParameters : array = []

Return values

UriInterface

getDefaultProviderIdentifier()

Get the default provider

protected getDefaultProviderIdentifier() : string

Return values

string

getRecommendedProviderIdentifier()

Get the recommended provider

protected getRecommendedProviderIdentifier() : string

Return values

string

getReturnUrl()

protected getReturnUrl(ServerRequestInterface $request) : string

Parameters

$request : ServerRequestInterface

Return values

string

hasSuitableDefaultProviders()

Check if there are more suitable default providers for the current user

protected hasSuitableDefaultProviders([array $excludedProviders = [] ]) : bool

Parameters

$excludedProviders : array = []

Return values

bool

initializeMfaConfiguration()

Initialize MFA configuration based on TSconfig and global configuration

protected initializeMfaConfiguration() : void

isActionAllowed()

protected isActionAllowed(string $action) : bool

Parameters

$action : string

Return values

bool

isProviderAllowed()

protected isProviderAllowed(string $identifier) : bool

Parameters

$identifier : string

Return values

bool

isValidIdentifier()

protected isValidIdentifier(string $identifier) : bool

Parameters

$identifier : string

Return values

bool

overviewAction()

Setup the overview with all available MFA providers

protected overviewAction(ServerRequestInterface $request) : ResponseInterface

Parameters

$request : ServerRequestInterface

Return values

ResponseInterface

removeDefaultProvider()

protected removeDefaultProvider() : void

saveAction()

Handle save request, receiving from the edit view by forwarding the request to the appropriate provider.

protected saveAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface

Parameters

$request : ServerRequestInterface
$mfaProvider : MfaProviderManifestInterface

Return values

ResponseInterface

unlockAction()

Handle unlock request by forwarding the request to the appropriate provider

protected unlockAction(ServerRequestInterface $request, MfaProviderManifestInterface $mfaProvider) : ResponseInterface

Parameters

$request : ServerRequestInterface
$mfaProvider : MfaProviderManifestInterface

Return values

ResponseInterface
On this page