‪TYPO3CMS  10.4
LoginController.php
Go to the documentation of this file.
1 <?php
2 
3 declare(strict_types=1);
4 
5 /*
6  * This file is part of the TYPO3 CMS project.
7  *
8  * It is free software; you can redistribute it and/or modify it under
9  * the terms of the GNU General Public License, either version 2
10  * of the License, or any later version.
11  *
12  * For the full copyright and license information, please read the
13  * LICENSE.txt file that was distributed with this source code.
14  *
15  * The TYPO3 project - inspiring people to share!
16  */
17 
19 
20 use Psr\EventDispatcher\EventDispatcherInterface;
21 use Psr\Http\Message\ResponseInterface;
22 use Psr\Http\Message\ServerRequestInterface;
23 use Psr\Log\LoggerAwareInterface;
24 use Psr\Log\LoggerAwareTrait;
25 use Symfony\Component\HttpFoundation\Cookie;
48 
53 class ‪LoginController implements LoggerAwareInterface
54 {
55  use LoggerAwareTrait;
56 
62  protected ‪$redirectUrl;
63 
69  protected ‪$redirectToURL;
70 
77 
83  protected ‪$loginProviders = [];
84 
92  protected ‪$loginRefresh;
93 
99  protected ‪$submitValue;
100 
104  protected ‪$view;
105 
110 
114  protected ‪$eventDispatcher;
115 
119  protected ‪$typo3Information;
120 
124  protected ‪$uriBuilder;
125 
129  protected ‪$features;
130 
134  protected ‪$pageRenderer;
135 
136  public function ‪__construct(
138  EventDispatcherInterface ‪$eventDispatcher,
141  ) {
142  $this->typo3Information = ‪$typo3Information;
143  $this->eventDispatcher = ‪$eventDispatcher;
144  $this->uriBuilder = ‪$uriBuilder;
145  $this->features = ‪$features;
146  }
147 
155  public function ‪formAction(ServerRequestInterface $request): ResponseInterface
156  {
157  $this->‪init($request);
158  return new ‪HtmlResponse($this->‪createLoginLogoutForm($request));
159  }
160 
167  public function ‪refreshAction(ServerRequestInterface $request): ResponseInterface
168  {
169  $this->‪init($request);
170  $this->loginRefresh = true;
171  return new ‪HtmlResponse($this->‪createLoginLogoutForm($request));
172  }
173 
180  public function ‪forgetPasswordFormAction(ServerRequestInterface $request): ResponseInterface
181  {
182  // Only allow to execute this if not logged in as a user right now
183  $context = GeneralUtility::makeInstance(Context::class);
184  if ($context->getAspect('backend.user')->isLoggedIn()) {
185  return $this->‪formAction($request);
186  }
187  $this->‪init($request);
188  // Enable the switch in the template
189  $this->view->assign('enablePasswordReset', GeneralUtility::makeInstance(PasswordReset::class)->isEnabled());
190  $this->view->setTemplate('Login/ForgetPasswordForm');
191  $this->moduleTemplate->setContent($this->view->render());
192  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
193  }
194 
201  public function ‪initiatePasswordResetAction(ServerRequestInterface $request): ResponseInterface
202  {
203  // Only allow to execute this if not logged in as a user right now
204  $context = GeneralUtility::makeInstance(Context::class);
205  if ($context->getAspect('backend.user')->isLoggedIn()) {
206  return $this->‪formAction($request);
207  }
208  $this->‪init($request);
209  $passwordReset = GeneralUtility::makeInstance(PasswordReset::class);
210  $this->view->assign('enablePasswordReset', $passwordReset->isEnabled());
211  $this->view->setTemplate('Login/ForgetPasswordForm');
212 
213  $emailAddress = $request->getParsedBody()['email'] ?? '';
214  $this->view->assign('email', $emailAddress);
215  if (!GeneralUtility::validEmail($emailAddress)) {
216  $this->view->assign('invalidEmail', true);
217  } else {
218  $passwordReset->initiateReset($request, $context, $emailAddress);
219  $this->view->assign('resetInitiated', true);
220  }
221  $this->moduleTemplate->setContent($this->view->render());
222  // Prevent time based information disclosure by waiting a random time
223  // before sending a response. This prevents that the reponse time
224  // can be an indicator if the used email exists or not.
225  // wait a random time between 200 milliseconds and 3 seconds.
226  usleep(random_int(200000, 3000000));
227  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
228  }
229 
236  public function ‪passwordResetAction(ServerRequestInterface $request): ResponseInterface
237  {
238  // Only allow to execute this if not logged in as a user right now
239  $context = GeneralUtility::makeInstance(Context::class);
240  if ($context->getAspect('backend.user')->isLoggedIn()) {
241  return $this->‪formAction($request);
242  }
243  $this->‪init($request);
244  $passwordReset = GeneralUtility::makeInstance(PasswordReset::class);
245  $this->view->setTemplate('Login/ResetPasswordForm');
246  $this->view->assign('enablePasswordReset', $passwordReset->isEnabled());
247  if (!$passwordReset->isValidResetTokenFromRequest($request)) {
248  $this->view->assign('invalidToken', true);
249  }
250  $this->view->assign('token', $request->getQueryParams()['t'] ?? '');
251  $this->view->assign('identity', $request->getQueryParams()['i'] ?? '');
252  $this->view->assign('expirationDate', $request->getQueryParams()['e'] ?? '');
253  $this->moduleTemplate->setContent($this->view->render());
254  return new ‪HtmlResponse($this->moduleTemplate->renderContent());
255  }
256 
263  public function ‪passwordResetFinishAction(ServerRequestInterface $request): ResponseInterface
264  {
265  // Only allow to execute this if not logged in as a user right now
266  $context = GeneralUtility::makeInstance(Context::class);
267  if ($context->getAspect('backend.user')->isLoggedIn()) {
268  return $this->‪formAction($request);
269  }
270  $passwordReset = GeneralUtility::makeInstance(PasswordReset::class);
271  // Token is invalid
272  if ($request->getMethod() !== 'POST' || !$passwordReset->isValidResetTokenFromRequest($request)) {
273  return $this->‪passwordResetAction($request);
274  }
275  $this->‪init($request);
276  $this->view->setTemplate('Login/ResetPasswordForm');
277  $this->view->assign('enablePasswordReset', $passwordReset->isEnabled());
278  $this->view->assign('token', $request->getQueryParams()['t'] ?? '');
279  $this->view->assign('identity', $request->getQueryParams()['i'] ?? '');
280  $this->view->assign('expirationDate', $request->getQueryParams()['e'] ?? '');
281  if ($passwordReset->resetPassword($request, $context)) {
282  $this->view->assign('resetExecuted', true);
283  } else {
284  $this->view->assign('error', true);
285  }
286  $this->moduleTemplate->setContent($this->view->render());
287  return new HtmlResponse($this->moduleTemplate->renderContent());
288  }
289 
295  public function ‪getLoginProviderIdentifier()
296  {
298  }
299 
305  protected function ‪init(ServerRequestInterface $request): void
306  {
307  $this->moduleTemplate = GeneralUtility::makeInstance(ModuleTemplate::class);
308  $this->moduleTemplate->setTitle('TYPO3 CMS Login: ' . ‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['sitename']);
309  $this->pageRenderer = $this->moduleTemplate->getPageRenderer();
310  $parsedBody = $request->getParsedBody();
311  $queryParams = $request->getQueryParams();
313 
314  $this->redirectUrl = GeneralUtility::sanitizeLocalUrl($parsedBody['redirect_url'] ?? $queryParams['redirect_url'] ?? null);
315  $this->loginProviderIdentifier = $this->‪detectLoginProvider($request);
316 
317  $this->loginRefresh = (bool)($parsedBody['loginRefresh'] ?? $queryParams['loginRefresh'] ?? false);
318  // Value of "Login" button. If set, the login button was pressed.
319  $this->submitValue = $parsedBody['commandLI'] ?? $queryParams['commandLI'] ?? null;
320  // Try to get the preferred browser language
321  $httpAcceptLanguage = $request->getServerParams()['HTTP_ACCEPT_LANGUAGE'];
322  $preferredBrowserLanguage = GeneralUtility::makeInstance(Locales::class)->getPreferredClientLanguage($httpAcceptLanguage);
323 
324  // If we found a $preferredBrowserLanguage and it is not the default language and no be_user is logged in
325  // initialize $this->getLanguageService() again with $preferredBrowserLanguage
326  if ($preferredBrowserLanguage !== 'default' && empty($this->‪getBackendUserAuthentication()->user['uid'])) {
327  $this->‪getLanguageService()->‪init($preferredBrowserLanguage);
328  $this->pageRenderer->setLanguage($preferredBrowserLanguage);
329  }
330 
331  $this->‪getLanguageService()->‪includeLLFile('EXT:backend/Resources/Private/Language/locallang_login.xlf');
332 
333  // Setting the redirect URL to "index.php?M=main" if no alternative input is given
334  if ($this->redirectUrl) {
335  $this->redirectToURL = ‪$this->redirectUrl;
336  } else {
337  // (consolidate RouteDispatcher::evaluateReferrer() when changing 'main' to something different)
338  $this->redirectToURL = (string)$this->uriBuilder->buildUriFromRoute('main');
339  }
340 
341  // If "L" is "OUT", then any logged in is logged out. If redirect_url is given, we redirect to it
342  if (($parsedBody['L'] ?? $queryParams['L'] ?? null) === 'OUT' && is_object($this->‪getBackendUserAuthentication())) {
344  $this->‪redirectToUrl();
345  }
346 
347  $this->view = $this->moduleTemplate->getView();
348  $this->view->getRequest()->setControllerExtensionName('Backend');
350  $this->pageRenderer->loadRequireJsModule('TYPO3/CMS/Backend/Login');
351  $this->view->assign('referrerCheckEnabled', $this->features->isFeatureEnabled('security.backend.enforceReferrer'));
352  $this->view->assign('loginUrl', (string)$request->getUri());
353  $this->view->assign('loginProviderIdentifier', $this->loginProviderIdentifier);
354  }
355 
356  protected function ‪provideCustomLoginStyling()
357  {
358  // Extension Configuration
359  ‪$extConf = GeneralUtility::makeInstance(ExtensionConfiguration::class)->get('backend');
360 
361  // Background Image
362  if (!empty(‪$extConf['loginBackgroundImage'])) {
363  $backgroundImage = $this->‪getUriForFileName(‪$extConf['loginBackgroundImage']);
364  if ($backgroundImage === '') {
365  $this->logger->warning(
366  'The configured TYPO3 backend login background image "' . htmlspecialchars(‪$extConf['loginBackgroundImage']) .
367  '" can\'t be resolved. Please check if the file exists and the extension is activated.'
368  );
369  }
370  $this->pageRenderer->addCssInlineBlock('loginBackgroundImage', '
371  .typo3-login-carousel-control.right,
372  .typo3-login-carousel-control.left,
373  .panel-login { border: 0; }
374  .typo3-login { background-image: url("' . $backgroundImage . '"); }
375  .typo3-login-footnote { background-color: #000000; color: #ffffff; opacity: 0.5; }
376  ');
377  }
378 
379  // Login Footnote
380  if (!empty(‪$extConf['loginFootnote'])) {
381  $this->view->assign('loginFootnote', strip_tags(trim(‪$extConf['loginFootnote'])));
382  }
383 
384  // Add additional css to use the highlight color in the login screen
385  if (!empty(‪$extConf['loginHighlightColor'])) {
386  $this->pageRenderer->addCssInlineBlock('loginHighlightColor', '
387  .btn-login.disabled, .btn-login[disabled], fieldset[disabled] .btn-login,
388  .btn-login.disabled:hover, .btn-login[disabled]:hover, fieldset[disabled] .btn-login:hover,
389  .btn-login.disabled:focus, .btn-login[disabled]:focus, fieldset[disabled] .btn-login:focus,
390  .btn-login.disabled.focus, .btn-login[disabled].focus, fieldset[disabled] .btn-login.focus,
391  .btn-login.disabled:active, .btn-login[disabled]:active, fieldset[disabled] .btn-login:active,
392  .btn-login.disabled.active, .btn-login[disabled].active, fieldset[disabled] .btn-login.active,
393  .btn-login:hover, .btn-login:focus, .btn-login:active,
394  .btn-login:active:hover, .btn-login:active:focus,
395  .btn-login { background-color: ' . ‪$extConf['loginHighlightColor'] . '; }
396  .panel-login .panel-body { border-color: ' . ‪$extConf['loginHighlightColor'] . '; }
397  ');
398  }
399 
400  // Logo
401  if (!empty(‪$extConf['loginLogo'])) {
402  if ($this->‪getUriForFileName(‪$extConf['loginLogo']) === '') {
403  $this->logger->warning(
404  'The configured TYPO3 backend login logo "' . htmlspecialchars(‪$extConf['loginLogo']) .
405  '" can\'t be resolved. Please check if the file exists and the extension is activated.'
406  );
407  }
408  $logo = ‪$extConf['loginLogo'];
409  } else {
410  // Use TYPO3 logo depending on highlight color
411  if (!empty(‪$extConf['loginHighlightColor'])) {
412  $logo = 'EXT:backend/Resources/Public/Images/typo3_black.svg';
413  } else {
414  $logo = 'EXT:backend/Resources/Public/Images/typo3_orange.svg';
415  }
416  $this->pageRenderer->addCssInlineBlock('loginLogo', '
417  .typo3-login-logo .typo3-login-image { max-width: 150px; height:100%;}
418  ');
419  }
420  $this->view->assignMultiple([
421  'logo' => $this->‪getUriForFileName($logo),
422  'images' => [
423  'capslock' => $this->‪getUriForFileName('EXT:backend/Resources/Public/Images/icon_capslock.svg'),
424  'typo3' => $this->‪getUriForFileName('EXT:backend/Resources/Public/Images/typo3_orange.svg'),
425  ],
426  'copyright' => $this->typo3Information->getCopyrightNotice(),
427  ]);
428  }
429 
436  protected function ‪createLoginLogoutForm(ServerRequestInterface $request): string
437  {
438  // Checking, if we should make a redirect.
439  // Might set JavaScript in the header to close window.
440  $this->‪checkRedirect($request);
441 
442  // Start form
443  $formType = empty($this->‪getBackendUserAuthentication()->user['uid']) ? 'LoginForm' : 'LogoutForm';
444  $this->view->assignMultiple([
445  'backendUser' => $this->‪getBackendUserAuthentication()->user,
446  'hasLoginError' => $this->‪isLoginInProgress($request),
447  'formType' => $formType,
448  'redirectUrl' => $this->redirectUrl,
449  'loginRefresh' => $this->loginRefresh,
450  'loginProviders' => $this->loginProviders,
451  'loginNewsItems' => $this->‪getSystemNews(),
452  ]);
453 
454  // Initialize interface selectors:
455  $this->‪makeInterfaceSelector($request);
457 
458  $this->moduleTemplate->setContent($this->view->render());
459  return $this->moduleTemplate->renderContent();
460  }
461 
462  protected function ‪renderHtmlViaLoginProvider(): void
463  {
465  $loginProvider = GeneralUtility::makeInstance($this->loginProviders[$this->loginProviderIdentifier]['provider']);
466  $this->eventDispatcher->dispatch(
468  $this,
469  $this->view,
470  $this->pageRenderer
471  )
472  );
473  $loginProvider->render($this->view, $this->pageRenderer, $this);
474  }
475 
486  protected function ‪checkRedirect(ServerRequestInterface $request): void
487  {
488  $backendUser = $this->‪getBackendUserAuthentication();
489  if (empty($backendUser->user['uid'])) {
490  return;
491  }
492 
493  /*
494  * If no cookie has been set previously, we tell people that this is a problem.
495  * This assumes that a cookie-setting script (like this one) has been hit at
496  * least once prior to this instance.
497  */
498  if (!isset($_COOKIE[‪BackendUserAuthentication::getCookieName()])) {
499  if ($this->submitValue === 'setCookie') {
500  // we tried it a second time but still no cookie
501  throw new \RuntimeException('Login-error: Yeah, that\'s a classic. No cookies, no TYPO3. ' .
502  'Please accept cookies from TYPO3 - otherwise you\'ll not be able to use the system.', 1294586846);
503  }
504  // try it once again - that might be needed for auto login
505  $this->redirectToURL = 'index.php?commandLI=setCookie';
506  }
507  $redirectToUrl = (string)($backendUser->getTSConfig()['auth.']['BE.']['redirectToURL'] ?? '');
508  if (empty($redirectToUrl)) {
509  // Based on the interface we set the redirect script
510  $parsedBody = $request->getParsedBody();
511  $queryParams = $request->getQueryParams();
512  $interface = $parsedBody['interface'] ?? $queryParams['interface'] ?? '';
513  switch ($interface) {
514  case 'frontend':
515  $this->redirectToURL = '../';
516  break;
517  case 'backend':
518  // (consolidate RouteDispatcher::evaluateReferrer() when changing 'main' to something different)
519  $this->redirectToURL = (string)$this->uriBuilder->buildUriFromRoute('main');
520  break;
521  }
522  } else {
523  $this->redirectToURL = $redirectToUrl;
524  $interface = '';
525  }
526  // store interface
527  $backendUser->uc['interfaceSetup'] = $interface;
528  $backendUser->writeUC();
529 
530  $formProtection = ‪FormProtectionFactory::get();
531  if (!$formProtection instanceof BackendFormProtection) {
532  throw new \RuntimeException('The Form Protection retrieved does not match the expected one.', 1432080411);
533  }
534  if ($this->loginRefresh) {
535  $formProtection->setSessionTokenFromRegistry();
536  $formProtection->persistSessionToken();
537  $this->pageRenderer->addJsInlineCode('loginRefresh', '
538  if (window.opener && window.opener.TYPO3 && window.opener.TYPO3.LoginRefresh) {
539  window.opener.TYPO3.LoginRefresh.startTask();
540  window.close();
541  }
542  ');
543  } else {
544  $formProtection->storeSessionTokenInRegistry();
545  $this->‪redirectToUrl();
546  }
547  }
548 
553  protected function ‪makeInterfaceSelector(ServerRequestInterface $request): void
554  {
555  // If interfaces are defined AND no input redirect URL in GET vars:
556  if (‪$GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces'] && ($this->‪isLoginInProgress($request) || !$this->redirectUrl)) {
557  $parts = ‪GeneralUtility::trimExplode(',', ‪$GLOBALS['TYPO3_CONF_VARS']['BE']['interfaces']);
558  if (count($parts) > 1) {
559  // Only if more than one interface is defined we will show the selector
560  $interfaces = [
561  'backend' => [
562  'label' => $this->‪getLanguageService()->‪getLL('interface.backend'),
563  'jumpScript' => (string)$this->uriBuilder->buildUriFromRoute('main'),
564  'interface' => 'backend'
565  ],
566  'frontend' => [
567  'label' => $this->‪getLanguageService()->‪getLL('interface.frontend'),
568  'jumpScript' => '../',
569  'interface' => 'frontend'
570  ]
571  ];
572 
573  $this->view->assign('showInterfaceSelector', true);
574  $this->view->assign('interfaces', $interfaces);
575  } elseif (!$this->redirectUrl) {
576  // If there is only ONE interface value set and no redirect_url is present
577  $this->view->assign('showInterfaceSelector', false);
578  $this->view->assign('interface', $parts[0]);
579  }
580  }
581  }
582 
589  protected function ‪getSystemNews(): array
590  {
591  $systemNewsTable = 'sys_news';
592  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)
593  ->getQueryBuilderForTable($systemNewsTable);
594  $systemNews = [];
595  $systemNewsRecords = $queryBuilder
596  ->select('title', 'content', 'crdate')
597  ->from($systemNewsTable)
598  ->orderBy('crdate', 'DESC')
599  ->execute()
600  ->fetchAll();
601  foreach ($systemNewsRecords as $systemNewsRecord) {
602  $systemNews[] = [
603  'date' => $systemNewsRecord['crdate'] ? date(‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['ddmmyy'], (int)$systemNewsRecord['crdate']) : '',
604  'header' => $systemNewsRecord['title'],
605  'content' => $systemNewsRecord['content']
606  ];
607  }
608  return $systemNews;
609  }
610 
620  private function ‪getUriForFileName($filename): string
621  {
622  // Check if it's already a URL
623  if (preg_match('/^(https?:)?\/\//', $filename)) {
624  return $filename;
625  }
626  $absoluteFilename = GeneralUtility::getFileAbsFileName(ltrim($filename, '/'));
627  $filename = '';
628  if ($absoluteFilename !== '' && @is_file($absoluteFilename)) {
629  $filename = ‪PathUtility::getAbsoluteWebPath($absoluteFilename);
630  }
631  return $filename;
632  }
633 
640  protected function ‪isLoginInProgress(ServerRequestInterface $request): bool
641  {
642  $parsedBody = $request->getParsedBody();
643  $queryParams = $request->getQueryParams();
644  $username = $parsedBody['username'] ?? $queryParams['username'] ?? null;
645  return !empty($username) || !empty($this->submitValue);
646  }
647 
651  protected function ‪redirectToUrl(): void
652  {
653  ‪HttpUtility::redirect($this->redirectToURL);
654  }
655 
661  protected function ‪validateAndSortLoginProviders()
662  {
663  $providers = ‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['backend']['loginProviders'] ?? [];
664  if (empty($providers) || !is_array($providers)) {
665  throw new \RuntimeException('No login providers are registered in $GLOBALS[\'TYPO3_CONF_VARS\'][\'EXTCONF\'][\'backend\'][\'loginProviders\'].', 1433417281);
666  }
667  foreach ($providers as $identifier => $configuration) {
668  if (empty($configuration) || !is_array($configuration)) {
669  throw new \RuntimeException('Missing configuration for login provider "' . $identifier . '".', 1433416043);
670  }
671  if (!is_string($configuration['provider']) || empty($configuration['provider']) || !class_exists($configuration['provider']) || !is_subclass_of($configuration['provider'], LoginProviderInterface::class)) {
672  throw new \RuntimeException('The login provider "' . $identifier . '" defines an invalid provider. Ensure the class exists and implements the "' . LoginProviderInterface::class . '".', 1460977275);
673  }
674  if (empty($configuration['label'])) {
675  throw new \RuntimeException('Missing label definition for login provider "' . $identifier . '".', 1433416044);
676  }
677  if (empty($configuration['icon-class'])) {
678  throw new \RuntimeException('Missing icon definition for login provider "' . $identifier . '".', 1433416045);
679  }
680  if (!isset($configuration['sorting'])) {
681  throw new \RuntimeException('Missing sorting definition for login provider "' . $identifier . '".', 1433416046);
682  }
683  }
684  // sort providers
685  uasort($providers, function ($a, $b) {
686  return $b['sorting'] - $a['sorting'];
687  });
688  $this->loginProviders = $providers;
689  }
690 
698  protected function ‪detectLoginProvider(ServerRequestInterface $request): string
699  {
700  $parsedBody = $request->getParsedBody();
701  $queryParams = $request->getQueryParams();
702  $loginProvider = $parsedBody['loginProvider'] ?? $queryParams['loginProvider'] ?? '';
703  if ((empty($loginProvider) || !isset($this->loginProviders[$loginProvider])) && !empty($_COOKIE['be_lastLoginProvider'])) {
704  $loginProvider = $_COOKIE['be_lastLoginProvider'];
705  }
706  reset($this->loginProviders);
707  $primaryLoginProvider = (string)key($this->loginProviders);
708  if (empty($loginProvider) || !isset($this->loginProviders[$loginProvider])) {
709  $loginProvider = $primaryLoginProvider;
710  }
711 
712  if ($loginProvider !== $primaryLoginProvider) {
713  // Use the secure option when the current request is served by a secure connection
715  $normalizedParams = $request->getAttribute('normalizedParams');
716  $isHttps = $normalizedParams->isHttps();
717  $cookieSecure = (bool)‪$GLOBALS['TYPO3_CONF_VARS']['SYS']['cookieSecure'] && $isHttps;
718  $cookie = new Cookie(
719  'be_lastLoginProvider',
720  $loginProvider,
721  ‪$GLOBALS['EXEC_TIME'] + 7776000, // 90 days
722  $normalizedParams->getSitePath() . TYPO3_mainDir,
723  '',
724  $cookieSecure,
725  true,
726  false,
727  Cookie::SAMESITE_STRICT
728  );
729  header('Set-Cookie: ' . $cookie->__toString(), false);
730  }
731  return (string)$loginProvider;
732  }
733 
739  protected function ‪getLanguageService(): LanguageService
740  {
741  return ‪$GLOBALS['LANG'];
742  }
743 
747  protected function ‪getBackendUserAuthentication(): BackendUserAuthentication
748  {
749  return ‪$GLOBALS['BE_USER'];
750  }
751 }
‪TYPO3\CMS\Backend\Controller\LoginController\isLoginInProgress
‪bool isLoginInProgress(ServerRequestInterface $request)
Definition: LoginController.php:627
‪TYPO3\CMS\Backend\Controller\LoginController\$redirectToURL
‪string $redirectToURL
Definition: LoginController.php:67
‪TYPO3\CMS\Backend\LoginProvider\LoginProviderInterface
Definition: LoginProviderInterface.php:26
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory\get
‪static TYPO3 CMS Core FormProtection AbstractFormProtection get($classNameOrType='default',... $constructorArguments)
Definition: FormProtectionFactory.php:74
‪TYPO3\CMS\Core\Utility\PathUtility
Definition: PathUtility.php:24
‪TYPO3\CMS\Core\Localization\LanguageService\includeLLFile
‪array includeLLFile($fileRef, $setGlobal=null, $mergeLocalOntoDefault=null)
Definition: LanguageService.php:297
‪TYPO3\CMS\Backend\Controller\LoginController\getLanguageService
‪LanguageService getLanguageService()
Definition: LoginController.php:726
‪TYPO3\CMS\Core\Information\Typo3Information
Definition: Typo3Information.php:26
‪TYPO3\CMS\Backend\LoginProvider\Event\ModifyPageLayoutOnLoginProviderSelectionEvent
Definition: ModifyPageLayoutOnLoginProviderSelectionEvent.php:26
‪TYPO3\CMS\Backend\Controller\LoginController\getLoginProviderIdentifier
‪string getLoginProviderIdentifier()
Definition: LoginController.php:282
‪TYPO3\CMS\Backend\Controller\LoginController\passwordResetFinishAction
‪ResponseInterface passwordResetFinishAction(ServerRequestInterface $request)
Definition: LoginController.php:250
‪TYPO3\CMS\Core\Configuration\ExtensionConfiguration
Definition: ExtensionConfiguration.php:45
‪TYPO3\CMS\Backend\Controller\LoginController\provideCustomLoginStyling
‪provideCustomLoginStyling()
Definition: LoginController.php:343
‪TYPO3\CMS\Backend\Controller\LoginController\refreshAction
‪ResponseInterface refreshAction(ServerRequestInterface $request)
Definition: LoginController.php:154
‪TYPO3\CMS\Backend\Controller\LoginController\$features
‪Features $features
Definition: LoginController.php:117
‪TYPO3\CMS\Backend\Controller\LoginController\$view
‪StandaloneView $view
Definition: LoginController.php:97
‪TYPO3\CMS\Backend\Authentication\PasswordReset
Definition: PasswordReset.php:58
‪TYPO3\CMS\Backend\Controller\LoginController\passwordResetAction
‪ResponseInterface passwordResetAction(ServerRequestInterface $request)
Definition: LoginController.php:223
‪TYPO3\CMS\Core\FormProtection\BackendFormProtection
Definition: BackendFormProtection.php:75
‪TYPO3\CMS\Backend\Controller\LoginController\$redirectUrl
‪string $redirectUrl
Definition: LoginController.php:61
‪TYPO3\CMS\Backend\Controller\LoginController\$moduleTemplate
‪ModuleTemplate $moduleTemplate
Definition: LoginController.php:101
‪TYPO3\CMS\Backend\Controller\LoginController\$loginProviderIdentifier
‪string $loginProviderIdentifier
Definition: LoginController.php:73
‪TYPO3\CMS\Core\Localization\Locales
Definition: Locales.php:30
‪TYPO3\CMS\Backend\Controller\LoginController\getUriForFileName
‪string getUriForFileName($filename)
Definition: LoginController.php:607
‪TYPO3\CMS\Backend\Controller\LoginController\getBackendUserAuthentication
‪BackendUserAuthentication getBackendUserAuthentication()
Definition: LoginController.php:734
‪TYPO3\CMS\Backend\Controller\LoginController\getSystemNews
‪array getSystemNews()
Definition: LoginController.php:576
‪TYPO3\CMS\Backend\Controller\LoginController\$loginProviders
‪array $loginProviders
Definition: LoginController.php:79
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:53
‪TYPO3\CMS\Backend\Template\ModuleTemplate
Definition: ModuleTemplate.php:43
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\getCookieName
‪static string getCookieName()
Definition: BackendUserAuthentication.php:2462
‪TYPO3\CMS\Backend\Controller\LoginController\$uriBuilder
‪UriBuilder $uriBuilder
Definition: LoginController.php:113
‪TYPO3\CMS\Core\Page\PageRenderer
Definition: PageRenderer.php:42
‪TYPO3\CMS\Backend\Controller\LoginController\createLoginLogoutForm
‪string createLoginLogoutForm(ServerRequestInterface $request)
Definition: LoginController.php:423
‪TYPO3\CMS\Backend\Controller\LoginController\$loginRefresh
‪bool $loginRefresh
Definition: LoginController.php:87
‪TYPO3\CMS\Backend\Routing\UriBuilder
Definition: UriBuilder.php:38
‪TYPO3\CMS\Backend\Controller\LoginController\initiatePasswordResetAction
‪ResponseInterface initiatePasswordResetAction(ServerRequestInterface $request)
Definition: LoginController.php:188
‪TYPO3\CMS\Core\Localization\LanguageService\init
‪init($languageKey)
Definition: LanguageService.php:122
‪TYPO3\CMS\Backend\Controller\LoginController\validateAndSortLoginProviders
‪validateAndSortLoginProviders()
Definition: LoginController.php:648
‪TYPO3\CMS\Backend\Controller\LoginController\$pageRenderer
‪PageRenderer $pageRenderer
Definition: LoginController.php:121
‪TYPO3\CMS\Core\Configuration\Features
Definition: Features.php:56
‪TYPO3\CMS\Backend\Controller\LoginController\$typo3Information
‪Typo3Information $typo3Information
Definition: LoginController.php:109
‪TYPO3\CMS\Backend\Controller\LoginController\makeInterfaceSelector
‪makeInterfaceSelector(ServerRequestInterface $request)
Definition: LoginController.php:540
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:62
‪TYPO3\CMS\Backend\Controller\LoginController\renderHtmlViaLoginProvider
‪renderHtmlViaLoginProvider()
Definition: LoginController.php:449
‪TYPO3\CMS\Backend\Controller\LoginController\formAction
‪ResponseInterface formAction(ServerRequestInterface $request)
Definition: LoginController.php:142
‪TYPO3\CMS\Backend\Controller\LoginController\init
‪init(ServerRequestInterface $request)
Definition: LoginController.php:292
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\logoff
‪logoff()
Definition: BackendUserAuthentication.php:2652
‪TYPO3\CMS\Backend\Controller\LoginController\$submitValue
‪string $submitValue
Definition: LoginController.php:93
‪TYPO3\CMS\Core\Utility\GeneralUtility\trimExplode
‪static string[] trimExplode($delim, $string, $removeEmptyValues=false, $limit=0)
Definition: GeneralUtility.php:1059
‪TYPO3\CMS\Backend\Controller\LoginController\$eventDispatcher
‪EventDispatcherInterface $eventDispatcher
Definition: LoginController.php:105
‪TYPO3\CMS\Backend\Controller\LoginController\redirectToUrl
‪redirectToUrl()
Definition: LoginController.php:638
‪TYPO3\CMS\Core\FormProtection\FormProtectionFactory
Definition: FormProtectionFactory.php:47
‪TYPO3\CMS\Fluid\View\StandaloneView
Definition: StandaloneView.php:34
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:5
‪TYPO3\CMS\Core\Utility\HttpUtility
Definition: HttpUtility.php:24
‪TYPO3\CMS\Core\Localization\LanguageService
Definition: LanguageService.php:42
‪TYPO3\CMS\Backend\Controller\LoginController\__construct
‪__construct(Typo3Information $typo3Information, EventDispatcherInterface $eventDispatcher, UriBuilder $uriBuilder, Features $features)
Definition: LoginController.php:123
‪TYPO3\CMS\Backend\Controller\LoginController\forgetPasswordFormAction
‪ResponseInterface forgetPasswordFormAction(ServerRequestInterface $request)
Definition: LoginController.php:167
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪$extConf
‪$extConf
Definition: ext_localconf.php:56
‪TYPO3\CMS\Core\Localization\LanguageService\getLL
‪string getLL($index)
Definition: LanguageService.php:154
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:46
‪TYPO3\CMS\Core\Utility\PathUtility\getAbsoluteWebPath
‪static string getAbsoluteWebPath($targetPath)
Definition: PathUtility.php:43
‪TYPO3\CMS\Backend\Controller\LoginController\detectLoginProvider
‪string detectLoginProvider(ServerRequestInterface $request)
Definition: LoginController.php:685
‪TYPO3\CMS\Core\Utility\HttpUtility\redirect
‪static redirect($url, $httpStatus=self::HTTP_STATUS_303)
Definition: HttpUtility.php:106
‪TYPO3\CMS\Backend\Controller\LoginController
Definition: LoginController.php:54
‪TYPO3\CMS\Backend\Controller
Definition: AbstractFormEngineAjaxController.php:18
‪TYPO3\CMS\Backend\Controller\LoginController\checkRedirect
‪checkRedirect(ServerRequestInterface $request)
Definition: LoginController.php:473
‪TYPO3\CMS\Core\Http\NormalizedParams
Definition: NormalizedParams.php:35
‪TYPO3\CMS\Core\Http\HtmlResponse
Definition: HtmlResponse.php:26