‪TYPO3CMS  ‪main
TYPO3\CMS\Backend\Controller\LoginController Class Reference
Inheritance diagram for TYPO3\CMS\Backend\Controller\LoginController:
TYPO3\CMS\Backend\Template\PageRendererBackendSetupTrait

Public Member Functions

 __construct (protected readonly Typo3Information $typo3Information, protected readonly EventDispatcherInterface $eventDispatcher, protected readonly PageRenderer $pageRenderer, protected readonly UriBuilder $uriBuilder, protected readonly Features $features, protected readonly Context $context, protected readonly LoginProviderResolver $loginProviderResolver, protected readonly ExtensionConfiguration $extensionConfiguration, protected readonly BackendEntryPointResolver $backendEntryPointResolver, protected readonly FormProtectionFactory $formProtectionFactory, protected readonly Locales $locales,)
 
 formAction (ServerRequestInterface $request)
 
 refreshAction (ServerRequestInterface $request)
 
 requestTokenAction (ServerRequestInterface $request)
 
 getLoginProviderIdentifier ()
 
 getCurrentRequest ()
 

Protected Member Functions

 appendLoginProviderCookie (ServerRequestInterface $request, NormalizedParams $normalizedParams, ResponseInterface $response)
 
 init (ServerRequestInterface $request)
 
 provideCustomLoginStyling ()
 
 createLoginLogoutForm (ServerRequestInterface $request)
 
 renderHtmlViaLoginProvider ()
 
 checkRedirect (ServerRequestInterface $request)
 
 getSystemNews ()
 
 isLoginInProgress (ServerRequestInterface $request)
 
 redirectToUrl ()
 
 provideRequestTokenJwt ()
 
 getLanguageService ()
 
 getBackendUserAuthentication ()
 
- ‪Protected Member Functions inherited from ‪TYPO3\CMS\Backend\Template\PageRendererBackendSetupTrait
 setUpBasicPageRendererForBackend (PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService,)
 
 loadStylesheets (PageRenderer $pageRenderer)
 
 getBackendFavicon (ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request)
 
string getUriForFileName (ServerRequestInterface $request, string $filename)
 
 getNormalizedParams (ServerRequestInterface $request)
 

Protected Attributes

string $redirectUrl
 
string $redirectToURL
 
string $loginProviderIdentifier = ''
 
bool $loginRefresh
 
string $submitValue
 
StandaloneView $view
 
ServerRequestInterface $request
 

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 60 of file LoginController.php.

Constructor & Destructor Documentation

◆ __construct()

TYPO3\CMS\Backend\Controller\LoginController::__construct ( protected readonly Typo3Information  $typo3Information,
protected readonly EventDispatcherInterface  $eventDispatcher,
protected readonly PageRenderer  $pageRenderer,
protected readonly UriBuilder  $uriBuilder,
protected readonly Features  $features,
protected readonly Context  $context,
protected readonly LoginProviderResolver  $loginProviderResolver,
protected readonly ExtensionConfiguration  $extensionConfiguration,
protected readonly BackendEntryPointResolver  $backendEntryPointResolver,
protected readonly FormProtectionFactory  $formProtectionFactory,
protected readonly Locales  $locales 
)

Definition at line 103 of file LoginController.php.

Member Function Documentation

◆ appendLoginProviderCookie()

TYPO3\CMS\Backend\Controller\LoginController::appendLoginProviderCookie ( ServerRequestInterface  $request,
NormalizedParams  $normalizedParams,
ResponseInterface  $response 
)
protected

If a login provider was chosen in the previous request, which is not the default provider, it is stored in a Cookie and appended to the HTTP Response.

Definition at line 174 of file LoginController.php.

References $GLOBALS, TYPO3\CMS\Backend\Controller\LoginController\$request, and TYPO3\CMS\Core\Http\NormalizedParams\isHttps().

Referenced by TYPO3\CMS\Backend\Controller\LoginController\formAction(), and TYPO3\CMS\Backend\Controller\LoginController\refreshAction().

◆ checkRedirect()

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

◆ createLoginLogoutForm()

◆ formAction()

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

Definition at line 121 of file LoginController.php.

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

◆ getBackendUserAuthentication()

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

◆ getCurrentRequest()

TYPO3\CMS\Backend\Controller\LoginController::getCurrentRequest ( )
Todo:
‪: Ugly. This can be used by login providers, they receive an instance of $this.

Definition at line 165 of file LoginController.php.

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

Referenced by TYPO3\CMS\Backend\LoginProvider\UsernamePasswordLoginProvider\render().

◆ getLanguageService()

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

◆ getLoginProviderIdentifier()

TYPO3\CMS\Backend\Controller\LoginController::getLoginProviderIdentifier ( )
Todo:
‪: Ugly. This can be used by login providers, they receive an instance of $this. Unused in core, though. It should vanish when login providers receive love.

Definition at line 157 of file LoginController.php.

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

◆ getSystemNews()

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

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

Definition at line 400 of file LoginController.php.

References $GLOBALS.

◆ init()

◆ isLoginInProgress()

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

Checks if login credentials are currently submitted

Definition at line 426 of file LoginController.php.

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

◆ provideCustomLoginStyling()

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

◆ provideRequestTokenJwt()

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

◆ redirectToUrl()

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

Wrapper method to redirect to configured redirect URL.

Exceptions
PropagateResponseException

Definition at line 439 of file LoginController.php.

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

◆ refreshAction()

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

◆ renderHtmlViaLoginProvider()

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

◆ requestTokenAction()

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

Returns a new request-token value, which is signed by a new nonce value (the nonce is sent as cookie automatically in RequestTokenMiddleware since it is created via the NoncePool).

Definition at line 145 of file LoginController.php.

References TYPO3\CMS\Core\Security\RequestToken\HEADER_NAME, and TYPO3\CMS\Backend\Controller\LoginController\provideRequestTokenJwt().

Member Data Documentation

◆ $loginProviderIdentifier

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

the active login provider identifier

Definition at line 78 of file LoginController.php.

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

◆ $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 86 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 73 of file LoginController.php.

◆ $redirectUrl

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

The URL to redirect to after login.

Definition at line 67 of file LoginController.php.

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

◆ $request

◆ $submitValue

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

Value of forms submit button for login.

Definition at line 92 of file LoginController.php.

◆ $view

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

Definition at line 96 of file LoginController.php.