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.
Attributes
- #[AsController]
Table of Contents
Properties
- $backendEntryPointResolver : BackendEntryPointResolver
- $context : Context
- $eventDispatcher : EventDispatcherInterface
- $extensionConfiguration : ExtensionConfiguration
- $features : Features
- $formProtectionFactory : FormProtectionFactory
- $locales : Locales
- $loginProviderIdentifier : string
- the active login provider identifier
- $loginProviderResolver : LoginProviderResolver
- $loginRefresh : bool
- 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.
- $pageRenderer : PageRenderer
- $redirectToURL : string
- Set to the redirect URL of the form (may be redirect_url or "index.php?M=main")
- $redirectUrl : string
- The URL to redirect to after login.
- $request : ServerRequestInterface
- $submitValue : string
- Value of forms submit button for login.
- $typo3Information : Typo3Information
- $uriBuilder : UriBuilder
- $view : StandaloneView
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
- Checking, if we should perform some sort of redirection OR closing of windows.
- createLoginLogoutForm() : ResponseInterface
- Main function - creating the login/logout form
- getBackendFavicon() : string
- Retrieves configured favicon for backend with fallback.
- getBackendUserAuthentication() : BackendUserAuthentication
- getLanguageService() : LanguageService
- getNormalizedParams() : NormalizedParams
- getRegisteredStylesheetFolders() : array<string|int, mixed>
- Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
- 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
- init() : void
- Initialize the login box. Will also react on a &L=OUT flag and exit.
- isLoginInProgress() : bool
- Checks if login credentials are currently submitted
- loadStylesheets() : void
- Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
- provideCustomLoginStyling() : void
- provideRequestTokenJwt() : string
- redirectToUrl() : void
- Wrapper method to redirect to configured redirect URL.
- renderHtmlViaLoginProvider() : void
- setUpBasicPageRendererForBackend() : void
- Sets mandatory parameters for the PageRenderer.
Properties
$backendEntryPointResolver read-only
protected
BackendEntryPointResolver
$backendEntryPointResolver
$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
$loginProviderIdentifier
the active login provider identifier
protected
string
$loginProviderIdentifier
= ''
$loginProviderResolver read-only
protected
LoginProviderResolver
$loginProviderResolver
$loginRefresh
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.
protected
bool
$loginRefresh
$pageRenderer read-only
protected
PageRenderer
$pageRenderer
$redirectToURL
Set to the redirect URL of the form (may be redirect_url or "index.php?M=main")
protected
string
$redirectToURL
$redirectUrl
The URL to redirect to after login.
protected
string
$redirectUrl
$request
protected
ServerRequestInterface
$request
Tags
$submitValue
Value of forms submit button for login.
protected
string
$submitValue
$typo3Information read-only
protected
Typo3Information
$typo3Information
$uriBuilder read-only
protected
UriBuilder
$uriBuilder
$view
protected
StandaloneView
$view
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) : mixed
Parameters
- $typo3Information : Typo3Information
- $eventDispatcher : EventDispatcherInterface
- $pageRenderer : PageRenderer
- $uriBuilder : UriBuilder
- $features : Features
- $context : Context
- $loginProviderResolver : LoginProviderResolver
- $extensionConfiguration : ExtensionConfiguration
- $backendEntryPointResolver : BackendEntryPointResolver
- $formProtectionFactory : FormProtectionFactory
- $locales : Locales
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
Tags
Return values
ServerRequestInterfacegetLoginProviderIdentifier()
public
getLoginProviderIdentifier() : string
Tags
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, NormalizedParams $normalizedParams, ResponseInterface $response) : ResponseInterface
Parameters
- $request : ServerRequestInterface
- $normalizedParams : NormalizedParams
- $response : ResponseInterface
Return values
ResponseInterfacecheckRedirect()
Checking, if we should perform some sort of redirection OR closing of windows.
protected
checkRedirect(ServerRequestInterface $request) : void
Do a redirect if a user is logged in.
Parameters
- $request : ServerRequestInterface
Tags
createLoginLogoutForm()
Main function - creating the login/logout form
protected
createLoginLogoutForm(ServerRequestInterface $request) : ResponseInterface
Parameters
- $request : ServerRequestInterface
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
NormalizedParamsgetRegisteredStylesheetFolders()
Return an array of all stylesheet directories registered via $GLOBAlS['TBE_STYLES']['skins'].
protected
getRegisteredStylesheetFolders() : array<string|int, mixed>
will be removed in TYPO3 v13.0. Use $GLOBALS['TYPO3_CONF_VARS']['BE']['stylesheets'] instead.
Return values
array<string|int, mixed>getSystemNews()
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.
init()
Initialize the login box. Will also react on a &L=OUT flag and exit.
protected
init(ServerRequestInterface $request) : void
Parameters
- $request : ServerRequestInterface
isLoginInProgress()
Checks if login credentials are currently submitted
protected
isLoginInProgress(ServerRequestInterface $request) : bool
Parameters
- $request : ServerRequestInterface
Return values
boolloadStylesheets()
Load all registered stylesheets from $GLOBALS['TBE_STYLES'] "API"
protected
loadStylesheets(PageRenderer $pageRenderer) : void
Parameters
- $pageRenderer : PageRenderer
provideCustomLoginStyling()
protected
provideCustomLoginStyling() : void
provideRequestTokenJwt()
protected
provideRequestTokenJwt() : string
Return values
stringredirectToUrl()
Wrapper method to redirect to configured redirect URL.
protected
redirectToUrl() : void
Tags
renderHtmlViaLoginProvider()
protected
renderHtmlViaLoginProvider() : void
setUpBasicPageRendererForBackend()
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