AjaxLoginController
This is the ajax handler for backend login after timeout.
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
- isTimedOutAction() : ResponseInterface
- Checks if the user session is expired yet
- loginAction() : ResponseInterface
- Handles the actual login process, more specifically it defines the response.
- logoutAction() : ResponseInterface
- Logs out the current BE user
- preflightAction() : ResponseInterface
- refreshAction() : ResponseInterface
- Handles the actual session refresh, more specifically it defines the response.
- getBackendUser() : BackendUserAuthentication|null
- hasLoginBeenProcessed() : bool
- Check whether the user was already authorized or not
- isAuthorizedBackendSession() : bool
- Checks if a user is logged in and the session is active.
Properties
$formProtectionFactory read-only
protected
FormProtectionFactory
$formProtectionFactory
$lockService read-only
protected
BackendLocker
$lockService
Methods
__construct()
public
__construct(FormProtectionFactory $formProtectionFactory, BackendLocker $lockService) : mixed
Parameters
- $formProtectionFactory : FormProtectionFactory
- $lockService : BackendLocker
isTimedOutAction()
Checks if the user session is expired yet
public
isTimedOutAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceloginAction()
Handles the actual login process, more specifically it defines the response.
public
loginAction(ServerRequestInterface $request) : ResponseInterface
The login details were sent in as part of the ajax request and automatically logged in the user inside the BackendUserAuthenticator middleware. If that was successful, we have a BE user and reset the timer and hide the login window. If it was unsuccessful, we display that and show the login box again.
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacelogoutAction()
Logs out the current BE user
public
logoutAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacepreflightAction()
public
preflightAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacerefreshAction()
Handles the actual session refresh, more specifically it defines the response.
public
refreshAction(ServerRequestInterface $request) : ResponseInterface
The session refresh has been performed inside the BackendUserAuthenticator middleware. If that was successful, we have a BE user and report that information as response.
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacegetBackendUser()
protected
getBackendUser() : BackendUserAuthentication|null
Return values
BackendUserAuthentication|nullhasLoginBeenProcessed()
Check whether the user was already authorized or not
protected
hasLoginBeenProcessed(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface
Return values
boolisAuthorizedBackendSession()
Checks if a user is logged in and the session is active.
protected
isAuthorizedBackendSession() : bool