MfaAjaxController
Controller to manipulate MFA providers via AJAX in the backend
This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.
Attributes
- #[AsController]
Table of Contents
Properties
Methods
- __construct() : mixed
- handleRequest() : ResponseInterface
- Main entry point, checking prerequisite and dispatching to the requested action
- deactivateAction() : array<string|int, mixed>
- Deactivate MFA providers If the request contains a provider, it will be deactivated.
- getBackendUser() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getResponseData() : array<string|int, mixed>
- Prepare response data for a JSON response
- initializeUser() : AbstractUserAuthentication
- Initialize a user based on the table name
- isAllowedToPerformAction() : bool
- Check if the current logged in user is allowed to perform the requested action on the selected user.
Properties
$mfaProviderRegistry
protected
MfaProviderRegistry
$mfaProviderRegistry
Methods
__construct()
public
__construct(MfaProviderRegistry $mfaProviderRegistry) : mixed
Parameters
- $mfaProviderRegistry : MfaProviderRegistry
handleRequest()
Main entry point, checking prerequisite and dispatching to the requested action
public
handleRequest(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacedeactivateAction()
Deactivate MFA providers If the request contains a provider, it will be deactivated.
protected
deactivateAction(ServerRequestInterface $request, AbstractUserAuthentication $user) : array<string|int, mixed>
Otherwise all active providers are deactivated.
Parameters
- $request : ServerRequestInterface
- $user : AbstractUserAuthentication
Return values
array<string|int, mixed>getBackendUser()
protected
getBackendUser() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetResponseData()
Prepare response data for a JSON response
protected
getResponseData(bool $success, string $message[, AbstractUserAuthentication|null $user = null ]) : array<string|int, mixed>
Parameters
- $success : bool
- $message : string
- $user : AbstractUserAuthentication|null = null
Return values
array<string|int, mixed>initializeUser()
Initialize a user based on the table name
protected
initializeUser(int $userId, string $tableName) : AbstractUserAuthentication
Parameters
- $userId : int
- $tableName : string
Return values
AbstractUserAuthenticationisAllowedToPerformAction()
Check if the current logged in user is allowed to perform the requested action on the selected user.
protected
isAllowedToPerformAction(string $action, AbstractUserAuthentication $user) : bool
Parameters
- $action : string
- $user : AbstractUserAuthentication