TYPO3  7.6
Public Member Functions | Protected Member Functions | List of all members
AjaxLoginHandler Class Reference

Public Member Functions

 loginAction (ServerRequestInterface $request, ResponseInterface $response)
 
 logoutAction (ServerRequestInterface $request, ResponseInterface $response)
 
 refreshAction (ServerRequestInterface $request, ResponseInterface $response)
 
 isTimedOutAction (ServerRequestInterface $request, ResponseInterface $response)
 

Protected Member Functions

 isAuthorizedBackendSession ()
 
 hasLoginBeenProcessed ()
 
 getBackendUser ()
 

Detailed Description

This is the ajax handler for backend login after timeout.

Definition at line 24 of file AjaxLoginHandler.php.

Member Function Documentation

getBackendUser ( )
protected
hasLoginBeenProcessed ( )
protected

Check whether the user was already authorized or not

Returns
bool

Definition at line 140 of file AjaxLoginHandler.php.

References AjaxLoginHandler\getBackendUser().

Referenced by AjaxLoginHandler\loginAction().

isAuthorizedBackendSession ( )
protected

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

Returns
bool

Definition at line 129 of file AjaxLoginHandler.php.

References AjaxLoginHandler\getBackendUser().

Referenced by AjaxLoginHandler\loginAction().

isTimedOutAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Checks if the user session is expired yet

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 100 of file AjaxLoginHandler.php.

References $GLOBALS, $response, elseif, AjaxLoginHandler\getBackendUser(), and MessageInterface\getBody().

loginAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

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 TYPO3 CMS bootstrap part of the ajax call. 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
ResponseInterface$response
Returns
ResponseInterface

Definition at line 37 of file AjaxLoginHandler.php.

References $response, MessageInterface\getBody(), AjaxLoginHandler\hasLoginBeenProcessed(), and AjaxLoginHandler\isAuthorizedBackendSession().

logoutAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Logs out the current BE user

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 61 of file AjaxLoginHandler.php.

References $response, AjaxLoginHandler\getBackendUser(), and MessageInterface\getBody().

refreshAction ( ServerRequestInterface  $request,
ResponseInterface  $response 
)

Refreshes the login without needing login information. We just refresh the session.

Parameters
ServerRequestInterface$request
ResponseInterface$response
Returns
ResponseInterface

Definition at line 81 of file AjaxLoginHandler.php.

References $response, AjaxLoginHandler\getBackendUser(), and MessageInterface\getBody().