‪TYPO3CMS  10.4
TYPO3\CMS\Backend\Controller\LoginController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\LoginController:

Public Member Functions

 __construct (Typo3Information $typo3Information, EventDispatcherInterface $eventDispatcher, UriBuilder $uriBuilder, Features $features)
 
ResponseInterface formAction (ServerRequestInterface $request)
 
ResponseInterface refreshAction (ServerRequestInterface $request)
 
ResponseInterface forgetPasswordFormAction (ServerRequestInterface $request)
 
ResponseInterface initiatePasswordResetAction (ServerRequestInterface $request)
 
ResponseInterface passwordResetAction (ServerRequestInterface $request)
 
ResponseInterface passwordResetFinishAction (ServerRequestInterface $request)
 
string getLoginProviderIdentifier ()
 

Protected Member Functions

 init (ServerRequestInterface $request)
 
 provideCustomLoginStyling ()
 
string createLoginLogoutForm (ServerRequestInterface $request)
 
 renderHtmlViaLoginProvider ()
 
 checkRedirect (ServerRequestInterface $request)
 
 makeInterfaceSelector (ServerRequestInterface $request)
 
array getSystemNews ()
 
bool isLoginInProgress (ServerRequestInterface $request)
 
 redirectToUrl ()
 
 validateAndSortLoginProviders ()
 
string detectLoginProvider (ServerRequestInterface $request)
 
LanguageService getLanguageService ()
 
BackendUserAuthentication getBackendUserAuthentication ()
 

Protected Attributes

string $redirectUrl
 
string $redirectToURL
 
string $loginProviderIdentifier
 
array $loginProviders = array( )
 
bool $loginRefresh
 
string $submitValue
 
StandaloneView $view
 
ModuleTemplate $moduleTemplate
 
EventDispatcherInterface $eventDispatcher
 
Typo3Information $typo3Information
 
UriBuilder $uriBuilder
 
Features $features
 
PageRenderer $pageRenderer
 

Private Member Functions

string getUriForFileName ($filename)
 

Detailed Description

Controller responsible for rendering the TYPO3 Backend login form

This class is a specific Backend controller implementation and is not considered part of the Public TYPO3 API.

Definition at line 53 of file LoginController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\LoginController::__construct ( Typo3Information  $typo3Information,
EventDispatcherInterface  $eventDispatcher,
UriBuilder  $uriBuilder,
Features  $features 
)

Member Function Documentation

◆ checkRedirect()

TYPO3\CMS\Backend\Controller\LoginController::checkRedirect ( ServerRequestInterface  $request)
protected

Checking, if we should perform some sort of redirection OR closing of windows.

Do a redirect if a user is logged in

Parameters
ServerRequestInterface$request
Exceptions

Definition at line 473 of file LoginController.php.

References TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get(), TYPO3\CMS\Backend\Controller\LoginController\getBackendUserAuthentication(), TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getCookieName(), and TYPO3\CMS\Backend\Controller\LoginController\redirectToUrl().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm().

◆ createLoginLogoutForm()

◆ detectLoginProvider()

string TYPO3\CMS\Backend\Controller\LoginController::detectLoginProvider ( ServerRequestInterface  $request)
protected

Detect the login provider, get from request or choose the first one as default

Parameters
ServerRequestInterface$request
Returns
‪string

Definition at line 685 of file LoginController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\init().

◆ forgetPasswordFormAction()

ResponseInterface TYPO3\CMS\Backend\Controller\LoginController::forgetPasswordFormAction ( ServerRequestInterface  $request)

Show a form to enter an email address to request an email.

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 167 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\formAction(), and TYPO3\CMS\Backend\Controller\LoginController\init().

◆ formAction()

ResponseInterface TYPO3\CMS\Backend\Controller\LoginController::formAction ( ServerRequestInterface  $request)

Injects the request and response objects for the current request or subrequest As this controller goes only through the main() method, it is rather simple for now

Parameters
ServerRequestInterface$request‪the current request
Returns
‪ResponseInterface the finished response with the content

Definition at line 142 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm(), and TYPO3\CMS\Backend\Controller\LoginController\init().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\forgetPasswordFormAction(), TYPO3\CMS\Backend\Controller\LoginController\initiatePasswordResetAction(), TYPO3\CMS\Backend\Controller\LoginController\passwordResetAction(), and TYPO3\CMS\Backend\Controller\LoginController\passwordResetFinishAction().

◆ getBackendUserAuthentication()

BackendUserAuthentication TYPO3\CMS\Backend\Controller\LoginController::getBackendUserAuthentication ( )
protected

◆ getLanguageService()

LanguageService TYPO3\CMS\Backend\Controller\LoginController::getLanguageService ( )
protected

Returns LanguageService

Returns
‪LanguageService

Definition at line 726 of file LoginController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\init(), and TYPO3\CMS\Backend\Controller\LoginController\makeInterfaceSelector().

◆ getLoginProviderIdentifier()

string TYPO3\CMS\Backend\Controller\LoginController::getLoginProviderIdentifier ( )

This can be called by single login providers, they receive an instance of $this

Returns
‪string

Definition at line 282 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\$loginProviderIdentifier.

◆ getSystemNews()

array TYPO3\CMS\Backend\Controller\LoginController::getSystemNews ( )
protected

Gets news from sys_news and converts them into a format suitable for showing them at the login screen.

Returns
‪array An array of login news.

Definition at line 576 of file LoginController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm().

◆ getUriForFileName()

string TYPO3\CMS\Backend\Controller\LoginController::getUriForFileName (   $filename)
private

Returns the uri of a relative reference, resolves the "EXT:" prefix (way of referring to files inside extensions) and checks that the file is inside the project root of the TYPO3 installation

Parameters
string$filename‪The input filename/filepath to evaluate
Returns
‪string Returns the filename of $filename if valid, otherwise blank string.

Definition at line 607 of file LoginController.php.

References TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\provideCustomLoginStyling().

◆ init()

◆ initiatePasswordResetAction()

ResponseInterface TYPO3\CMS\Backend\Controller\LoginController::initiatePasswordResetAction ( ServerRequestInterface  $request)

Validate the email address.

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 188 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\formAction(), and TYPO3\CMS\Backend\Controller\LoginController\init().

◆ isLoginInProgress()

bool TYPO3\CMS\Backend\Controller\LoginController::isLoginInProgress ( ServerRequestInterface  $request)
protected

Checks if login credentials are currently submitted

Parameters
ServerRequestInterface$request
Returns
‪bool

Definition at line 627 of file LoginController.php.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm(), and TYPO3\CMS\Backend\Controller\LoginController\makeInterfaceSelector().

◆ makeInterfaceSelector()

TYPO3\CMS\Backend\Controller\LoginController::makeInterfaceSelector ( ServerRequestInterface  $request)
protected

◆ passwordResetAction()

ResponseInterface TYPO3\CMS\Backend\Controller\LoginController::passwordResetAction ( ServerRequestInterface  $request)

Validates the link and show a form to enter the new password.

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 223 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\formAction(), and TYPO3\CMS\Backend\Controller\LoginController\init().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\passwordResetFinishAction().

◆ passwordResetFinishAction()

ResponseInterface TYPO3\CMS\Backend\Controller\LoginController::passwordResetFinishAction ( ServerRequestInterface  $request)

Updates the password in the database.

Parameters
ServerRequestInterface$request
Returns
‪ResponseInterface

Definition at line 250 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\formAction(), TYPO3\CMS\Backend\Controller\LoginController\init(), and TYPO3\CMS\Backend\Controller\LoginController\passwordResetAction().

◆ provideCustomLoginStyling()

TYPO3\CMS\Backend\Controller\LoginController::provideCustomLoginStyling ( )
protected

◆ redirectToUrl()

TYPO3\CMS\Backend\Controller\LoginController::redirectToUrl ( )
protected

Wrapper method to redirect to configured redirect URL

Definition at line 638 of file LoginController.php.

References TYPO3\CMS\Core\Utility\HttpUtility\redirect().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\checkRedirect(), and TYPO3\CMS\Backend\Controller\LoginController\init().

◆ refreshAction()

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

Calls the main function but with loginRefresh enabled at any time

Parameters
ServerRequestInterface$request‪the current request
Returns
‪ResponseInterface the finished response with the content

Definition at line 154 of file LoginController.php.

References TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm(), and TYPO3\CMS\Backend\Controller\LoginController\init().

◆ renderHtmlViaLoginProvider()

TYPO3\CMS\Backend\Controller\LoginController::renderHtmlViaLoginProvider ( )
protected

◆ validateAndSortLoginProviders()

TYPO3\CMS\Backend\Controller\LoginController::validateAndSortLoginProviders ( )
protected

Validates the registered login providers

Exceptions

Definition at line 648 of file LoginController.php.

References $GLOBALS.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\init().

Member Data Documentation

◆ $eventDispatcher

EventDispatcherInterface TYPO3\CMS\Backend\Controller\LoginController::$eventDispatcher
protected

◆ $features

Features TYPO3\CMS\Backend\Controller\LoginController::$features
protected

◆ $loginProviderIdentifier

string TYPO3\CMS\Backend\Controller\LoginController::$loginProviderIdentifier
protected

the active login provider identifier

Definition at line 73 of file LoginController.php.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\getLoginProviderIdentifier().

◆ $loginProviders

array TYPO3\CMS\Backend\Controller\LoginController::$loginProviders = array( )
protected

List of registered and sorted login providers

Definition at line 79 of file LoginController.php.

◆ $loginRefresh

bool TYPO3\CMS\Backend\Controller\LoginController::$loginRefresh
protected

Login-refresh bool; The backend will call this script with this value set when the login is close to being expired and the form needs to be redrawn.

Definition at line 87 of file LoginController.php.

◆ $moduleTemplate

ModuleTemplate TYPO3\CMS\Backend\Controller\LoginController::$moduleTemplate
protected

Definition at line 101 of file LoginController.php.

◆ $pageRenderer

PageRenderer TYPO3\CMS\Backend\Controller\LoginController::$pageRenderer
protected

Definition at line 121 of file LoginController.php.

◆ $redirectToURL

string TYPO3\CMS\Backend\Controller\LoginController::$redirectToURL
protected

Set to the redirect URL of the form (may be redirect_url or "index.php?M=main")

Definition at line 67 of file LoginController.php.

◆ $redirectUrl

string TYPO3\CMS\Backend\Controller\LoginController::$redirectUrl
protected

The URL to redirect to after login.

Definition at line 61 of file LoginController.php.

Referenced by TYPO3\CMS\Backend\Controller\LoginController\init().

◆ $submitValue

string TYPO3\CMS\Backend\Controller\LoginController::$submitValue
protected

Value of forms submit button for login.

Definition at line 93 of file LoginController.php.

◆ $typo3Information

Typo3Information TYPO3\CMS\Backend\Controller\LoginController::$typo3Information
protected

◆ $uriBuilder

UriBuilder TYPO3\CMS\Backend\Controller\LoginController::$uriBuilder
protected

◆ $view

StandaloneView TYPO3\CMS\Backend\Controller\LoginController::$view
protected

Definition at line 97 of file LoginController.php.