‪TYPO3CMS  11.5
TYPO3\CMS\Backend\Controller\AjaxLoginController Class Reference

Public Member Functions

ResponseInterface loginAction (ServerRequestInterface $request)
 
ResponseInterface logoutAction (ServerRequestInterface $request)
 
 preflightAction (ServerRequestInterface $request)
 
ResponseInterface refreshAction (ServerRequestInterface $request)
 
ResponseInterface isTimedOutAction (ServerRequestInterface $request)
 

Protected Member Functions

bool isAuthorizedBackendSession ()
 
bool hasLoginBeenProcessed ()
 
BackendUserAuthentication null getBackendUser ()
 

Detailed Description

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.

Definition at line 31 of file AjaxLoginController.php.

Member Function Documentation

◆ getBackendUser()

◆ hasLoginBeenProcessed()

bool TYPO3\CMS\Backend\Controller\AjaxLoginController::hasLoginBeenProcessed ( )
protected

◆ isAuthorizedBackendSession()

bool TYPO3\CMS\Backend\Controller\AjaxLoginController::isAuthorizedBackendSession ( )
protected

Checks if a user is logged in and the session is active.

Returns
‪bool

Definition at line 138 of file AjaxLoginController.php.

References TYPO3\CMS\Backend\Controller\AjaxLoginController\getBackendUser().

Referenced by TYPO3\CMS\Backend\Controller\AjaxLoginController\loginAction().

◆ isTimedOutAction()

ResponseInterface TYPO3\CMS\Backend\Controller\AjaxLoginController::isTimedOutAction ( ServerRequestInterface  $request)

Checks if the user session is expired yet

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 112 of file AjaxLoginController.php.

References TYPO3\CMS\Core\Session\UserSessionManager\create(), TYPO3\CMS\Backend\Controller\AjaxLoginController\getBackendUser(), and TYPO3\CMS\Core\Core\Environment\getLegacyConfigPath().

◆ loginAction()

ResponseInterface TYPO3\CMS\Backend\Controller\AjaxLoginController::loginAction ( ServerRequestInterface  $request)

Handles the actual login process, more specifically it defines the response. 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
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 43 of file AjaxLoginController.php.

References TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get(), TYPO3\CMS\Backend\Controller\AjaxLoginController\hasLoginBeenProcessed(), and TYPO3\CMS\Backend\Controller\AjaxLoginController\isAuthorizedBackendSession().

◆ logoutAction()

ResponseInterface TYPO3\CMS\Backend\Controller\AjaxLoginController::logoutAction ( ServerRequestInterface  $request)

Logs out the current BE user

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 65 of file AjaxLoginController.php.

References TYPO3\CMS\Backend\Controller\AjaxLoginController\getBackendUser().

◆ preflightAction()

TYPO3\CMS\Backend\Controller\AjaxLoginController::preflightAction ( ServerRequestInterface  $request)

Definition at line 76 of file AjaxLoginController.php.

◆ refreshAction()

ResponseInterface TYPO3\CMS\Backend\Controller\AjaxLoginController::refreshAction ( ServerRequestInterface  $request)

Handles the actual session refresh, more specifically it defines the response. 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
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 96 of file AjaxLoginController.php.

References TYPO3\CMS\Backend\Controller\AjaxLoginController\getBackendUser().