LoginController uses PageRendererBackendSetupTrait
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.
Tags
Attributes
- #[AsController]
Table of Contents
Properties
- $authenticationStyleInformation : AuthenticationStyleInformation
- $backendEntryPointResolver : BackendEntryPointResolver
- $connectionPool : ConnectionPool
- $context : Context
- $eventDispatcher : EventDispatcherInterface
- $extensionConfiguration : ExtensionConfiguration
- $features : Features
- $formProtectionFactory : FormProtectionFactory
- $locales : Locales
- $loginProviderResolver : LoginProviderResolver
- $pageRenderer : PageRenderer
- $request : ServerRequestInterface
- $typo3Information : Typo3Information
- $uriBuilder : UriBuilder
- $viewFactory : ViewFactoryInterface
Methods
- __construct() : mixed
- formAction() : ResponseInterface
- 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
- getCurrentRequest() : ServerRequestInterface
- getLoginProviderIdentifier() : string
- refreshAction() : ResponseInterface
- Calls the main function but with loginRefresh enabled at any time
- requestTokenAction() : ResponseInterface
- 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`).
- appendLoginProviderCookie() : ResponseInterface
- 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.
- checkRedirect() : void
- createLoginLogout() : ResponseInterface
- getBackendFavicon() : string
- Retrieves configured favicon for backend with fallback.
- getBackendUserAuthentication() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getNormalizedParams() : NormalizedParams
- getSystemNews() : array<string|int, mixed>
- Gets news as array from sys_news and converts them into a format suitable for showing them at the login screen.
- getUriForFileName() : string
- 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
- isLoginInProgress() : bool
- Checks if login credentials have been submitted
- loadStylesheets() : void
- Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
- provideRequestTokenJwt() : string
- setUpBasicPageRendererForBackend() : void
- Sets mandatory parameters for the PageRenderer.
Properties
$authenticationStyleInformation read-only
protected
AuthenticationStyleInformation
$authenticationStyleInformation
$backendEntryPointResolver read-only
protected
BackendEntryPointResolver
$backendEntryPointResolver
$connectionPool read-only
protected
ConnectionPool
$connectionPool
$context read-only
protected
Context
$context
$eventDispatcher read-only
protected
EventDispatcherInterface
$eventDispatcher
$extensionConfiguration read-only
protected
ExtensionConfiguration
$extensionConfiguration
$features read-only
protected
Features
$features
$formProtectionFactory read-only
protected
FormProtectionFactory
$formProtectionFactory
$locales read-only
protected
Locales
$locales
$loginProviderResolver read-only
protected
LoginProviderResolver
$loginProviderResolver
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$request
Remove in v14 along with getCurrentRequest()
protected
ServerRequestInterface
$request
$typo3Information read-only
protected
Typo3Information
$typo3Information
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$viewFactory read-only
protected
ViewFactoryInterface
$viewFactory
Methods
__construct()
public
__construct(Typo3Information $typo3Information, EventDispatcherInterface $eventDispatcher, PageRenderer $pageRenderer, UriBuilder $uriBuilder, Features $features, Context $context, LoginProviderResolver $loginProviderResolver, ExtensionConfiguration $extensionConfiguration, BackendEntryPointResolver $backendEntryPointResolver, FormProtectionFactory $formProtectionFactory, Locales $locales, ConnectionPool $connectionPool, AuthenticationStyleInformation $authenticationStyleInformation, ViewFactoryInterface $viewFactory) : mixed
Parameters
- $typo3Information : Typo3Information
- $eventDispatcher : EventDispatcherInterface
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $features : Features
- $context : Context
- $loginProviderResolver : LoginProviderResolver
- $extensionConfiguration : ExtensionConfiguration
- $backendEntryPointResolver : BackendEntryPointResolver
- $formProtectionFactory : FormProtectionFactory
- $locales : Locales
- $connectionPool : ConnectionPool
- $authenticationStyleInformation : AuthenticationStyleInformation
- $viewFactory : ViewFactoryInterface
formAction()
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
public
formAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacegetCurrentRequest()
public
getCurrentRequest() : ServerRequestInterface
Remove in v14 along with LoginProviderInterface->render(). Also removed $this->request property.
Return values
ServerRequestInterfacegetLoginProviderIdentifier()
public
getLoginProviderIdentifier() : string
Remove in v14 along with LoginProviderInterface->render()
Return values
stringrefreshAction()
Calls the main function but with loginRefresh enabled at any time
public
refreshAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfacerequestTokenAction()
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`).
public
requestTokenAction(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
Return values
ResponseInterfaceappendLoginProviderCookie()
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.
protected
appendLoginProviderCookie(ServerRequestInterface $request, ResponseInterface $response) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $response : ResponseInterface
Return values
ResponseInterfacecheckRedirect()
protected
checkRedirect(ServerRequestInterface $request, BackendUserAuthentication $backendUser, bool $loginRefresh) : void
Parameters
- $request : ServerRequestInterface
- $backendUser : BackendUserAuthentication
- $loginRefresh : bool
Tags
createLoginLogout()
protected
createLoginLogout(ServerRequestInterface $request, bool $loginRefresh) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $loginRefresh : bool
-
The backend triggers this with this value set when the login is close to being expired and the form needs to be redrawn.
Tags
Return values
ResponseInterfacegetBackendFavicon()
Retrieves configured favicon for backend with fallback.
protected
getBackendFavicon(ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request) : string
Parameters
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
Return values
stringgetBackendUserAuthentication()
protected
getBackendUserAuthentication() : BackendUserAuthentication
Return values
BackendUserAuthenticationgetLanguageService()
protected
getLanguageService() : LanguageService
Return values
LanguageServicegetNormalizedParams()
protected
getNormalizedParams(ServerRequestInterface $request) : NormalizedParams
Parameters
- $request : ServerRequestInterface
Return values
NormalizedParamsgetSystemNews()
Gets news as array from sys_news and converts them into a format suitable for showing them at the login screen.
protected
getSystemNews() : array<string|int, mixed>
Return values
array<string|int, mixed>getUriForFileName()
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
protected
getUriForFileName(ServerRequestInterface $request, string $filename) : string
Parameters
- $request : ServerRequestInterface
- $filename : string
-
The input filename/filepath to evaluate
Return values
string —Returns the filename of $filename if valid, otherwise blank string.
isLoginInProgress()
Checks if login credentials have been submitted
protected
isLoginInProgress(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface
Return values
boolloadStylesheets()
Load all registered stylesheets from $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets']
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
provideRequestTokenJwt()
protected
provideRequestTokenJwt() : string
Return values
stringsetUpBasicPageRendererForBackend()
Sets mandatory parameters for the PageRenderer.
protected
setUpBasicPageRendererForBackend(PageRenderer $pageRenderer, ExtensionConfiguration $extensionConfiguration, ServerRequestInterface $request, LanguageService $languageService) : void
Parameters
- $pageRenderer : PageRenderer
- $extensionConfiguration : ExtensionConfiguration
- $request : ServerRequestInterface
- $languageService : LanguageService