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

Public Member Functions

 __construct (protected readonly FormProtectionFactory $formProtectionFactory)
 
 loginAction (ServerRequestInterface $request)
 
 logoutAction (ServerRequestInterface $request)
 
 preflightAction (ServerRequestInterface $request)
 
 refreshAction (ServerRequestInterface $request)
 
 isTimedOutAction (ServerRequestInterface $request)
 

Protected Member Functions

bool isAuthorizedBackendSession ()
 
 hasLoginBeenProcessed (ServerRequestInterface $request)
 
 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 36 of file AjaxLoginController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\AjaxLoginController::__construct ( protected readonly FormProtectionFactory  $formProtectionFactory)

Definition at line 38 of file AjaxLoginController.php.

Member Function Documentation

◆ getBackendUser()

◆ hasLoginBeenProcessed()

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

Check whether the user was already authorized or not

Definition at line 147 of file AjaxLoginController.php.

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

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

◆ 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 135 of file AjaxLoginController.php.

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

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

◆ isTimedOutAction()

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

◆ loginAction()

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.

Definition at line 49 of file AjaxLoginController.php.

References TYPO3\CMS\Backend\Controller\AjaxLoginController\hasLoginBeenProcessed(), and TYPO3\CMS\Backend\Controller\AjaxLoginController\isAuthorizedBackendSession().

◆ logoutAction()

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

Logs out the current BE user

Definition at line 68 of file AjaxLoginController.php.

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

◆ preflightAction()

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

Definition at line 79 of file AjaxLoginController.php.

◆ refreshAction()

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.

Definition at line 96 of file AjaxLoginController.php.

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