‪TYPO3CMS  ‪main
AbstractUserAuthentication.php
Go to the documentation of this file.
1 <?php
2 
3 /*
4  * This file is part of the TYPO3 CMS project.
5  *
6  * It is free software; you can redistribute it and/or modify it under
7  * the terms of the GNU General Public License, either version 2
8  * of the License, or any later version.
9  *
10  * For the full copyright and license information, please read the
11  * LICENSE.txt file that was distributed with this source code.
12  *
13  * The TYPO3 project - inspiring people to share!
14  */
15 
17 
18 use Psr\EventDispatcher\EventDispatcherInterface;
19 use Psr\Http\Message\ResponseInterface;
20 use Psr\Http\Message\ServerRequestInterface;
21 use Psr\Log\LoggerAwareInterface;
22 use Psr\Log\LoggerAwareTrait;
51 use ‪TYPO3\CMS\Core\SysLog\Action\Login as SystemLogLoginAction;
52 use ‪TYPO3\CMS\Core\SysLog\Error as SystemLogErrorClassification;
53 use ‪TYPO3\CMS\Core\SysLog\Type as SystemLogType;
56 
64 abstract class ‪AbstractUserAuthentication implements LoggerAwareInterface
65 {
66  use LoggerAwareTrait;
68 
73  public ‪$name = '';
74 
79  public ‪$user_table = '';
80 
85  public ‪$usergroup_table = '';
86 
91  public ‪$username_column = '';
92 
97  public ‪$userident_column = '';
98 
103  public ‪$userid_column = '';
104 
109  public ‪$usergroup_column = '';
110 
116  protected ‪$lastLogin_column = '';
117 
122  public ‪$enablecolumns = [
123  'rootLevel' => '',
124  // Boolean: If TRUE, 'AND pid=0' will be a part of the query...
125  'disabled' => '',
126  'starttime' => '',
127  'endtime' => '',
128  'deleted' => '',
129  ];
130 
136  protected ‪$formfield_uname = '';
137 
143  protected ‪$formfield_uident = '';
144 
150  protected ‪$formfield_status = '';
151 
156  public ‪$writeStdLog = false;
157 
162  public ‪$writeAttemptLog = false;
163 
168  public ‪$checkPid = true;
169 
174  public ‪$checkPid_value = 0;
175 
181  protected ‪$loginSessionStarted = false;
182 
187  public ‪$user;
188 
192  public array ‪$userGroups = [];
193 
199  protected ‪$dontSetCookie = false;
200 
205  public ‪$loginType = '';
206 
210  public array ‪$uc = [];
211 
212  protected ?‪UserSession ‪$userSession = null;
213 
215 
219  protected ‪SetCookieBehavior ‪$setCookie = SetCookieBehavior::None;
220 
226  public function ‪__construct()
227  {
228  // Backend or frontend login - used for auth services
229  if (empty($this->loginType)) {
230  throw new ‪Exception('No loginType defined, must be set explicitly by subclass', 1476045345);
231  }
232  }
233 
241  {
242  $this->userSessionManager = ‪$userSessionManager ?? ‪UserSessionManager::create($this->loginType);
243  $this->userSession = $this->userSessionManager->createAnonymousSession();
244  }
245 
255  public function ‪start(ServerRequestInterface $request)
256  {
257  $this->logger->debug('## Beginning of auth logging.');
258 
259  // Make certain that NO user is set initially
260  $this->user = null;
261 
262  if (!isset($this->userSessionManager)) {
264  }
265  $this->userSession = $this->userSessionManager->createFromRequestOrAnonymous($request, $this->name);
266 
267  // Load user session, check to see if anyone has submitted login-information and if so authenticate
268  // the user with the session. $this->user[uid] may be used to write log...
269  try {
270  $this->‪checkAuthentication($request);
271  } catch (MfaRequiredException $mfaRequiredException) {
272  // Ensure the cookie is still set to keep the user session available
273  if ($this->‪shallSetSessionCookie()) {
274  $this->‪setSessionCookie();
275  }
276  throw $mfaRequiredException;
277  }
278  if ($this->‪shallSetSessionCookie()) {
279  $this->‪setSessionCookie();
280  }
281  // Hook for alternative ways of filling the $this->user array (is used by the "timtaw" extension)
282  foreach (‪$GLOBALS['TYPO3_CONF_VARS']['SC_OPTIONS']['t3lib/class.t3lib_userauth.php']['postUserLookUp'] ?? [] as $funcName) {
283  $_params = [
284  'pObj' => $this,
285  ];
286  GeneralUtility::callUserFunction($funcName, $_params, $this);
287  }
288  }
289 
296  public function ‪appendCookieToResponse(ResponseInterface $response, ?NormalizedParams $normalizedParams = null): ResponseInterface
297  {
298  if ($this->setCookie === SetCookieBehavior::None) {
299  return $response;
300  }
301  if ($normalizedParams === null) {
302  $normalizedParams = ‪NormalizedParams::createFromRequest(‪$GLOBALS['TYPO3_REQUEST']);
303  }
304  $setCookieService = ‪SetCookieService::create($this->name, $this->loginType);
305  if ($this->setCookie === SetCookieBehavior::Send) {
306  $cookieObject = $setCookieService->setSessionCookie($this->userSession, $normalizedParams);
307  if ($cookieObject) {
308  $response = $response->withAddedHeader('Set-Cookie', $cookieObject->__toString());
309  }
310  }
311  if ($this->setCookie === ‪SetCookieBehavior::Remove) {
312  $cookieObject = $setCookieService->removeCookie($normalizedParams);
313  $response = $response->withAddedHeader('Set-Cookie', $cookieObject->__toString());
314  }
315  return $response;
316  }
317 
323  protected function ‪setSessionCookie()
324  {
325  $this->setCookie = SetCookieBehavior::Send;
326  }
327 
332  protected function ‪shallSetSessionCookie(): bool
333  {
334  return !$this->dontSetCookie
335  || ‪SetCookieService::create($this->name, $this->loginType)->isRefreshTimeBasedCookie($this->userSession);
336  }
337 
344  protected function ‪isSetSessionCookie()
345  {
346  return ‪SetCookieService::create($this->name, $this->loginType)->isSetSessionCookie($this->userSession);
347  }
348 
355  protected function ‪isRefreshTimeBasedCookie()
356  {
357  return ‪SetCookieService::create($this->name, $this->loginType)->isRefreshTimeBasedCookie($this->userSession);
358  }
359 
363  protected function ‪getAuthServiceConfiguration(): array
364  {
365  if (is_array(‪$GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['setup'] ?? null)) {
366  return ‪$GLOBALS['TYPO3_CONF_VARS']['SVCONF']['auth']['setup'];
367  }
368  return [];
369  }
370 
377  public function ‪checkAuthentication(ServerRequestInterface $request)
378  {
379  $authConfiguration = $this->‪getAuthServiceConfiguration();
380  if (!empty($authConfiguration)) {
381  $this->logger->debug('Authentication Service Configuration found.', ['auth_configuration' => $authConfiguration]);
382  }
383  $userRecordCandidate = false;
384  // User is not authenticated by default
385  $authenticated = false;
386  // User want to login with passed login data (name/password)
387  $activeLogin = false;
388  $this->logger->debug('Login type: {type}', ['type' => $this->loginType]);
389  // Get Login/Logout data submitted by a form or params
390  ‪$loginData = $this->‪getLoginFormData($request);
391  $this->logger->debug('Login data', $this->‪removeSensitiveLoginDataForLoggingInfo(‪$loginData));
392  $type = LoginType::tryFrom(‪$loginData['status'] ?? '');
393  // Active logout (eg. with "logout" button)
394  if ($type === ‪LoginType::LOGOUT) {
395  if ($this->writeStdLog) {
396  // $type,$action,$error,$details_nr,$details,$data,$tablename,$recuid,$recpid
397  $this->‪writelog(SystemLogType::LOGIN, ‪SystemLogLoginAction::LOGOUT, SystemLogErrorClassification::MESSAGE, 2, 'User %s logged out', [$this->user['username']], '', 0, 0);
398  }
399  $this->logger->info('User logged out. Id: {session}', ['session' => sha1($this->userSession->getIdentifier())]);
400  $this->‪logoff();
401  }
402  // Determine whether we need to skip session update.
403  // This is used mainly for checking session timeout in advance without refreshing the current session's timeout.
404  $skipSessionUpdate = (bool)($request->getQueryParams()['skipSessionUpdate'] ?? false);
405  $isExistingSession = false;
406  $anonymousSession = false;
407  $authenticatedUserFromSession = null;
408  if (!$this->userSession->isNew()) {
409  // Read user data if this is bound to a user
410  // However, if the user data is not valid, or the session has timed out we'll recreate a new anonymous session
411  if ($this->userSession->getUserId() > 0) {
412  $authenticatedUserFromSession = $this->‪fetchValidUserFromSessionOrDestroySession($skipSessionUpdate);
413  }
414  $isExistingSession = !$this->userSession->isNew();
415  $anonymousSession = $isExistingSession && $this->userSession->isAnonymous();
416  }
417 
418  // Active login (eg. with login form).
419  if ($type === LoginType::LOGIN) {
420  if (!$isExistingSession) {
421  $activeLogin = true;
422  $this->logger->debug('Active login (eg. with login form)');
423  // check referrer for submitted login values
424  if ($this->formfield_status && ‪$loginData['uident'] && ‪$loginData['uname']) {
425  // Delete old user session if any
426  $this->‪logoff();
427  }
428  // Refuse login for _CLI users, if not processing a CLI request type
429  // (although we shouldn't be here in case of a CLI request type)
430  if (stripos(‪$loginData['uname'], '_CLI_') === 0 && !‪Environment::isCli()) {
431  throw new \RuntimeException('TYPO3 Fatal Error: You have tried to login using a CLI user. Access prohibited!', 1270853931);
432  }
433  }
434  // Cause elevation of privilege, make sure regenerateSessionId is called later on
435  // Note for further research: $anonymousSession actually implies having $isExistingSession = true
436  // allowing to further simplify this concern.
437  if ($anonymousSession) {
438  $activeLogin = true;
439  }
440  }
441 
442  if ($isExistingSession && $authenticatedUserFromSession !== null) {
443  $this->logger->debug('User found in session', [
444  $this->userid_column => $authenticatedUserFromSession[$this->userid_column] ?? null,
445  $this->username_column => $authenticatedUserFromSession[$this->username_column] ?? null,
446  ]);
447  } else {
448  $this->logger->debug('No user session found');
449  }
450 
451  if ($activeLogin) {
452  $context = GeneralUtility::makeInstance(Context::class);
453  $securityAspect = ‪SecurityAspect::provideIn($context);
454  $requestToken = $securityAspect->getReceivedRequestToken();
455 
456  $event = new BeforeRequestTokenProcessedEvent($this, $request, $requestToken);
457  GeneralUtility::makeInstance(EventDispatcherInterface::class)->dispatch($event);
458  $requestToken = $event->getRequestToken();
459 
460  $requestTokenScopeMatches = ($requestToken->scope ?? null) === 'core/user-auth/' . strtolower($this->loginType);
461  if (!$requestTokenScopeMatches) {
462  $this->logger->debug('Missing or invalid request token during login', ['requestToken' => $requestToken]);
463  // important: disable `$activeLogin` state
464  $activeLogin = false;
465  } elseif ($requestToken instanceof RequestToken && $requestToken->getSigningSecretIdentifier() !== null) {
466  $securityAspect->getSigningSecretResolver()->revokeIdentifier(
467  $requestToken->getSigningSecretIdentifier()
468  );
469  }
470  }
471 
472  // Fetch users from the database (or somewhere else)
473  $possibleUsers = $this->‪fetchPossibleUsers(‪$loginData, $activeLogin, $isExistingSession, $authenticatedUserFromSession, $request);
474 
475  // If no new user was set we use the already found user session
476  if (empty($possibleUsers) && $isExistingSession && !$anonymousSession) {
477  // Check if the previous services returned a proper user
478  if (is_array($authenticatedUserFromSession)) {
479  $possibleUsers[] = $authenticatedUserFromSession;
480  $userRecordCandidate = $authenticatedUserFromSession;
481  // User is authenticated because we found a user session
482  $authenticated = true;
483  $this->logger->debug('User session used', [
484  $this->userid_column => $authenticatedUserFromSession[$this->userid_column] ?? '',
485  $this->username_column => $authenticatedUserFromSession[$this->username_column] ?? '',
486  ]);
487  }
488  }
489 
490  // Re-auth user when 'auth'-service option is set
491  if (!empty($authConfiguration[$this->loginType . '_alwaysAuthUser'])) {
492  $authenticated = false;
493  $this->logger->debug('alwaysAuthUser option is enabled');
494  }
495  // Authenticate the user if needed
496  if (!empty($possibleUsers) && !$authenticated) {
497  foreach ($possibleUsers as $userRecordCandidate) {
498  // Use 'auth' service to authenticate the user
499  // If one service returns FALSE then authentication failed
500  // a service might return 100 which means there's no reason to stop but the user can't be authenticated by that service
501  $this->logger->debug('Auth user', $this->‪removeSensitiveLoginDataForLoggingInfo($userRecordCandidate, true));
502  $subType = 'authUser' . ‪$this->loginType;
503 
505  foreach ($this->‪getAuthServices($subType, ‪$loginData, $authenticatedUserFromSession, $request) as $serviceObj) {
506  if (($ret = (int)$serviceObj->authUser($userRecordCandidate)) > 0) {
507  // If the service returns >=200 then no more checking is needed - useful for IP checking without password
508  if ($ret >= 200) {
509  $authenticated = true;
510  break;
511  }
512  if ($ret < 100) {
513  $authenticated = true;
514  }
515  // $ret is between 100 and 199 which means "I'm not responsible, ask others"
516  } else {
517  // $ret is < 0
518  $authenticated = false;
519  break;
520  }
521  }
522 
523  if ($authenticated) {
524  // Leave foreach() because a user is authenticated
525  break;
526  }
527  }
528  // mimic user authentication to mitigate observable timing discrepancies
529  // @link https://cwe.mitre.org/data/definitions/208.html
530  } elseif ($activeLogin) {
531  $subType = 'authUser' . ‪$this->loginType;
532  foreach ($this->‪getAuthServices($subType, ‪$loginData, $authenticatedUserFromSession, $request) as $serviceObj) {
533  if ($serviceObj instanceof MimicServiceInterface && $serviceObj->mimicAuthUser() === false) {
534  break;
535  }
536  }
537  }
538 
539  // If user is authenticated, then a valid user is found in $userRecordCandidate
540  if ($authenticated) {
541  // Insert session record if needed
542  if (!$isExistingSession
543  || $anonymousSession
544  || (int)($userRecordCandidate[$this->userid_column] ?? 0) !== $this->userSession->getUserId()
545  ) {
546  $sessionData = $this->userSession->getData();
547  // Create a new session with a fixated user
548  $this->userSession = $this->‪createUserSession($userRecordCandidate);
549 
550  // Preserve session data on login
551  if ($anonymousSession || $isExistingSession) {
552  $this->userSession->overrideData($sessionData);
553  }
554 
555  $this->user = array_merge($userRecordCandidate, $this->user ?? []);
556 
557  // The login session is started.
558  $this->loginSessionStarted = true;
559  $this->logger->debug('User session finally read', [
560  $this->userid_column => $this->‪getUserId(),
561  $this->username_column => $this->‪getUserName(),
562  ]);
563  } else {
564  // if we come here the current session is for sure not anonymous as this is a pre-condition for $authenticated = true
565  $this->user = $authenticatedUserFromSession;
566  }
567 
568  if ($activeLogin && !$this->userSession->isNew()) {
569  $this->‪regenerateSessionId();
570  }
571 
572  // Since the user is not fully authenticated we need to unpack UC here to be
573  // able to retrieve a possible defined default (preferred) MFA provider.
574  $this->‪unpack_uc();
575 
576  if ($activeLogin) {
577  // User logged in - write that to the log!
578  if ($this->writeStdLog) {
579  $this->‪writelog(SystemLogType::LOGIN, SystemLogLoginAction::LOGIN, SystemLogErrorClassification::MESSAGE, 1, 'User %s logged in from ###IP###', [$userRecordCandidate[$this->username_column]], '', '', '');
580  }
581  $this->logger->info('User {username} logged in from {ip}', [
582  'username' => $userRecordCandidate[$this->username_column],
583  'ip' => GeneralUtility::getIndpEnv('REMOTE_ADDR'),
584  ]);
585  } else {
586  $this->logger->debug('User {username} authenticated from {ip}', [
587  'username' => $userRecordCandidate[$this->username_column],
588  'ip' => GeneralUtility::getIndpEnv('REMOTE_ADDR'),
589  ]);
590  }
591  // Check if multi-factor authentication is required
593  } else {
594  // Mark the current login attempt as failed
595  if (empty($possibleUsers) && $activeLogin) {
596  $this->logger->debug('Login failed', [
598  ]);
599  } elseif (!empty($possibleUsers)) {
600  $this->logger->debug('Login failed', [
601  $this->userid_column => $userRecordCandidate[$this->userid_column],
602  $this->username_column => $userRecordCandidate[$this->username_column],
603  ]);
604  }
605 
606  // If there were a login failure, check to see if a warning email should be sent
607  if ($activeLogin) {
608  GeneralUtility::makeInstance(EventDispatcherInterface::class)->dispatch(
610  );
611  }
612  }
613  }
614 
620  protected function ‪fetchPossibleUsers(array ‪$loginData, bool $activeLogin, bool $isExistingSession, ?array $authenticatedUserFromSession, ServerRequestInterface $request): array
621  {
622  $possibleUsers = [];
623  $authConfiguration = $this->‪getAuthServiceConfiguration();
624  $alwaysFetchUsers = !empty($authConfiguration[$this->loginType . '_alwaysFetchUser']);
625  $fetchUsersIfNoSessionIsGiven = !empty($authConfiguration[$this->loginType . '_fetchUserIfNoSession']);
626  if (
627  $activeLogin
628  || $alwaysFetchUsers
629  || (!$isExistingSession && $fetchUsersIfNoSessionIsGiven)
630  ) {
631  // Use 'auth' service to find the user
632  // First found user will be used
633  $subType = 'getUser' . ‪$this->loginType;
635  foreach ($this->‪getAuthServices($subType, ‪$loginData, $authenticatedUserFromSession, $request) as $serviceObj) {
636  $row = $serviceObj->getUser();
637  if (is_array($row)) {
638  $possibleUsers[] = $row;
639  $this->logger->debug('User found', [
640  $this->userid_column => $row[$this->userid_column],
641  $this->username_column => $row[$this->username_column],
642  ]);
643  // User found, just stop to search for more if not configured to go on
644  if (empty($authConfiguration[$this->loginType . '_fetchAllUsers'])) {
645  break;
646  }
647  }
648  }
649 
650  if ($alwaysFetchUsers) {
651  $this->logger->debug($this->loginType . '_alwaysFetchUser option is enabled');
652  }
653  if (empty($possibleUsers)) {
654  $this->logger->debug('No user found by services');
655  } else {
656  $this->logger->debug('{count} user records found by services', ['count' => count($possibleUsers)]);
657  }
658  }
659  return $possibleUsers;
660  }
661 
671  protected function ‪evaluateMfaRequirements(): void
672  {
673  // MFA has been validated already, nothing to do
674  if ($this->‪getSessionData('mfa')) {
675  return;
676  }
677  // If the user session does not contain the 'mfa' key - indicating that MFA is already
678  // passed - get the first provider for authentication, which is either the default provider
679  // or the first active provider (based on the providers configured ordering).
680  $provider = GeneralUtility::makeInstance(MfaProviderRegistry::class)->getFirstAuthenticationAwareProvider($this);
681  // Throw an exception (hopefully caught in a middleware) when an active provider for the user exists
682  if ($provider !== null) {
683  throw new ‪MfaRequiredException($provider, 1613687097);
684  }
685  }
686 
692  public function ‪isMfaSetupRequired(): bool
693  {
694  return false;
695  }
696 
704  protected function ‪getAuthServices(string $subType, array ‪$loginData, ?array $authenticatedUserFromSession, ServerRequestInterface $request): \Traversable
705  {
706  $serviceChain = [];
707  // The info array provide additional information for auth services
708  $authInfo = $this->‪getAuthInfoArray($request);
709  if ($authenticatedUserFromSession !== null) {
710  $authInfo['user'] = $authenticatedUserFromSession;
711  }
712  while (is_object($serviceObj = GeneralUtility::makeInstanceService('auth', $subType, $serviceChain))) {
713  $serviceChain[] = $serviceObj->getServiceKey();
714  $serviceObj->initAuth($subType, ‪$loginData, $authInfo, $this);
715  yield $serviceObj;
716  }
717  if (!empty($serviceChain)) {
718  $this->logger->debug('{subtype} auth services called: {chain}', [
719  'subtype' => $subType,
720  'chain' => implode(',', $serviceChain),
721  ]);
722  }
723  }
724 
730  protected function ‪regenerateSessionId()
731  {
732  $this->userSession = $this->userSessionManager->regenerateSession($this->userSession->getIdentifier());
733  }
734 
735  /*************************
736  *
737  * User Sessions
738  *
739  *************************/
740 
747  public function ‪createUserSession(array $userRecordCandidate): UserSession
748  {
749  // Needed for testing framework
750  if (!isset($this->userSessionManager)) {
752  }
753  $userRecordCandidateId = (int)($userRecordCandidate[$this->userid_column] ?? 0);
754  $session = $this->userSessionManager->elevateToFixatedUserSession($this->userSession, $userRecordCandidateId);
755  // Updating lastLogin_column carrying information about last login.
756  $this->‪updateLoginTimestamp($userRecordCandidateId);
757  return $session;
758  }
759 
763  protected function ‪updateLoginTimestamp(int $userId)
764  {
765  if ($this->lastLogin_column) {
766  $connection = GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($this->user_table);
767  $connection->update(
768  $this->user_table,
769  [$this->lastLogin_column => ‪$GLOBALS['EXEC_TIME']],
770  [$this->userid_column => $userId]
771  );
772  $this->user[‪$this->lastLogin_column] = ‪$GLOBALS['EXEC_TIME'];
773  }
774  }
775 
785  protected function ‪fetchValidUserFromSessionOrDestroySession(bool $skipSessionUpdate = false): ?array
786  {
787  if ($this->userSession->isAnonymous()) {
788  return null;
789  }
790  // Fetch the user from the DB
791  $userRecord = $this->‪getRawUserByUid($this->userSession->getUserId() ?? 0);
792  if ($userRecord) {
793  // A user was found
794  $userRecord['is_online'] = $this->userSession->getLastUpdated();
795  if (!$this->userSessionManager->hasExpired($this->userSession)) {
796  if (!$skipSessionUpdate) {
797  $this->userSession = $this->userSessionManager->updateSessionTimestamp($this->userSession);
798  }
799  } else {
800  // Delete any user set...
801  $this->‪logoff();
802  $userRecord = false;
803  $this->userSession = $this->userSessionManager->createAnonymousSession();
804  }
805  }
806  return is_array($userRecord) ? $userRecord : null;
807  }
808 
814  public function ‪enforceNewSessionId()
815  {
816  $this->‪regenerateSessionId();
817  $this->‪setSessionCookie();
818  }
819 
825  public function ‪logoff()
826  {
827  $this->logger->debug('logoff: ses_id = {session}', ['session' => sha1($this->userSession->getIdentifier())]);
828 
829  $dispatcher = GeneralUtility::makeInstance(EventDispatcherInterface::class);
830 
831  $event = new ‪BeforeUserLogoutEvent($this, $this->userSession);
832  $event = $dispatcher->dispatch($event);
833 
834  if ($event->shouldLogout()) {
835  $this->‪performLogoff();
836  }
837 
838  $dispatcher->dispatch(new ‪AfterUserLoggedOutEvent($this));
839  }
840 
846  protected function ‪performLogoff()
847  {
848  if ($this->userSession) {
849  $this->userSessionManager->removeSession($this->userSession);
850  }
851  $this->userSession = $this->userSessionManager->createAnonymousSession();
852  $this->user = null;
853  if ($this->‪isCookieSet()) {
854  $this->‪removeCookie();
855  }
856  }
857 
864  public function ‪removeCookie($cookieName = null)
865  {
866  $this->setCookie = ‪SetCookieBehavior::Remove;
867  }
868 
876  protected function ‪isCookieSet()
877  {
878  return ‪SetCookieService::create($this->name, $this->loginType)->isCookieSet(
879  ‪$GLOBALS['TYPO3_REQUEST'] ?? null,
880  $this->userSession
881  );
882  }
883 
884  /*************************
885  *
886  * SQL Functions
887  *
888  *************************/
897  {
898  $restrictionContainer = GeneralUtility::makeInstance(DefaultRestrictionContainer::class);
899 
900  if (empty($this->enablecolumns['disabled'])) {
901  $restrictionContainer->removeByType(HiddenRestriction::class);
902  }
903 
904  if (empty($this->enablecolumns['deleted'])) {
905  $restrictionContainer->removeByType(DeletedRestriction::class);
906  }
907 
908  if (empty($this->enablecolumns['starttime'])) {
909  $restrictionContainer->removeByType(StartTimeRestriction::class);
910  }
911 
912  if (empty($this->enablecolumns['endtime'])) {
913  $restrictionContainer->removeByType(EndTimeRestriction::class);
914  }
915 
916  if (!empty($this->enablecolumns['rootLevel'])) {
917  $restrictionContainer->add(GeneralUtility::makeInstance(RootLevelRestriction::class, [$this->user_table]));
918  }
919 
920  if ($this->checkPid && $this->checkPid_value !== null && $this->checkPid_value !== '') {
921  $restrictionContainer->add(
922  GeneralUtility::makeInstance(
923  PageIdListRestriction::class,
924  [$this->user_table],
925  ‪GeneralUtility::intExplode(',', (string)$this->checkPid_value, true)
926  )
927  );
928  }
929 
930  return $restrictionContainer;
931  }
932 
933  /*************************
934  *
935  * Session and Configuration Handling
936  *
937  *************************/
942  public function ‪writeUC()
943  {
944  $userId = $this->‪getUserId();
945  if ($userId) {
946  $this->logger->debug('writeUC: {userid_column}={value}', [
947  'userid_column' => $this->userid_column,
948  'value' => $userId,
949  ]);
950  GeneralUtility::makeInstance(ConnectionPool::class)->getConnectionForTable($this->user_table)->update(
951  $this->user_table,
952  ['uc' => serialize($this->uc)],
953  [$this->userid_column => $userId],
954  ['uc' => ‪Connection::PARAM_LOB]
955  );
956  }
957  }
958 
963  protected function ‪unpack_uc()
964  {
965  if (isset($this->user['uc'])) {
966  $theUC = unserialize($this->user['uc'], ['allowed_classes' => false]);
967  if (is_array($theUC)) {
968  $this->uc = $theUC;
969  }
970  }
971  }
972 
982  public function ‪pushModuleData(string $module, mixed $data, bool $dontPersistImmediately = false): void
983  {
984  $hashService = GeneralUtility::makeInstance(HashService::class);
985  $sessionHash = $hashService->hmac(
986  $this->userSession->getIdentifier(),
987  'core-session-hash'
988  );
989  $this->uc['moduleData'][$module] = $data;
990  $this->uc['moduleSessionID'][$module] = $sessionHash;
991  if ($dontPersistImmediately === false) {
992  $this->‪writeUC();
993  }
994  }
995 
1003  public function ‪getModuleData(string $module, string $type = ''): mixed
1004  {
1005  $hashService = GeneralUtility::makeInstance(HashService::class);
1006  $sessionHash = $hashService->hmac(
1007  $this->userSession->getIdentifier(),
1008  'core-session-hash'
1009  );
1010  $sessionData = $this->uc['moduleData'][$module] ?? null;
1011  $moduleSessionIdHash = $this->uc['moduleSessionID'][$module] ?? null;
1012  if ($type !== 'ses' || ($sessionData !== null && $moduleSessionIdHash === $sessionHash)) {
1013  return $sessionData;
1014  }
1015  return null;
1016  }
1025  public function ‪getSessionData($key)
1026  {
1027  return $this->userSession ? $this->userSession->get($key) : '';
1028  }
1037  public function ‪setSessionData($key, $data)
1038  {
1039  $this->userSession->set($key, $data);
1040  }
1041 
1049  public function ‪setAndSaveSessionData($key, $data)
1050  {
1051  $this->userSession->set($key, $data);
1052  $this->logger->debug('setAndSaveSessionData: ses_id = {session}', ['session' => sha1($this->userSession->getIdentifier())]);
1053  $this->userSession = $this->userSessionManager->updateSession($this->userSession);
1054  }
1055 
1056  /*************************
1057  *
1058  * Misc
1059  *
1060  *************************/
1067  public function ‪getLoginFormData(ServerRequestInterface $request)
1068  {
1069  $parsedBody = $request->getParsedBody();
1070  $queryParams = $request->getQueryParams();
1071  ‪$loginData = [
1072  'status' => ‪StringUtility::filter($parsedBody[$this->formfield_status] ?? $queryParams[$this->formfield_status] ?? null),
1073  'uname' => ‪StringUtility::filter($parsedBody[$this->formfield_uname] ?? '', ''),
1074  'uident' => ‪StringUtility::filter($parsedBody[$this->formfield_uident] ?? '', ''),
1075  ];
1076  // Only process the login data if a login is requested
1077  if (LoginType::tryFrom(‪$loginData['status'] ?? '') === LoginType::LOGIN) {
1078  ‪$loginData = $this->‪processLoginData($loginData, $request);
1079  }
1080  return ‪$loginData;
1081  }
1082 
1083  public function ‪isActiveLogin(ServerRequestInterface $request): bool
1084  {
1085  $status = $request->getParsedBody()[‪$this->formfield_status] ?? $request->getQueryParams()[‪$this->formfield_status] ?? '';
1086  return LoginType::tryFrom($status) === LoginType::LOGIN;
1087  }
1088 
1096  public function ‪processLoginData(array ‪$loginData, ServerRequestInterface $request): array
1097  {
1098  $this->logger->debug('Login data before processing', $this->‪removeSensitiveLoginDataForLoggingInfo($loginData));
1099  $subType = 'processLoginData' . ‪$this->loginType;
1100  $isLoginDataProcessed = false;
1101  $processedLoginData = ‪$loginData;
1103  foreach ($this->‪getAuthServices($subType, ‪$loginData, null, $request) as $serviceObject) {
1104  $serviceResult = $serviceObject->processLoginData($processedLoginData, 'normal');
1105  if (!empty($serviceResult)) {
1106  $isLoginDataProcessed = true;
1107  // If the service returns >=200 then no more processing is needed
1108  if ((int)$serviceResult >= 200) {
1109  break;
1110  }
1111  }
1112  }
1113  if ($isLoginDataProcessed) {
1114  ‪$loginData = $processedLoginData;
1115  $this->logger->debug('Processed login data', $this->‪removeSensitiveLoginDataForLoggingInfo($processedLoginData));
1116  }
1117  return ‪$loginData;
1118  }
1119 
1130  protected function ‪removeSensitiveLoginDataForLoggingInfo($data, bool $isUserRecord = false)
1131  {
1132  if ($isUserRecord && is_array($data)) {
1133  $fieldNames = ['uid', 'pid', 'tstamp', 'crdate', 'deleted', 'disabled', 'starttime', 'endtime', 'username', 'admin', 'usergroup', 'db_mountpoints', 'file_mountpoints', 'file_permissions', 'workspace_perms', 'lastlogin', 'workspace_id', 'category_perms'];
1134  $data = array_intersect_key($data, array_combine($fieldNames, $fieldNames));
1135  }
1136  if (isset($data['uident'])) {
1137  $data['uident'] = '********';
1138  }
1139  if (isset($data['uident_text'])) {
1140  $data['uident_text'] = '********';
1141  }
1142  if (isset($data['password'])) {
1143  $data['password'] = '********';
1144  }
1145  return $data;
1146  }
1147 
1154  public function ‪getAuthInfoArray(ServerRequestInterface $request)
1155  {
1156  $queryBuilder = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->user_table);
1157  $expressionBuilder = $queryBuilder->expr();
1158  $authInfo = [];
1159  $authInfo['loginType'] = ‪$this->loginType;
1160  $authInfo['request'] = $request;
1161  $authInfo['refInfo'] = parse_url(GeneralUtility::getIndpEnv('HTTP_REFERER'));
1162  $authInfo['HTTP_HOST'] = GeneralUtility::getIndpEnv('HTTP_HOST');
1163  $authInfo['REMOTE_ADDR'] = GeneralUtility::getIndpEnv('REMOTE_ADDR');
1164  $authInfo['REMOTE_HOST'] = GeneralUtility::getIndpEnv('REMOTE_HOST');
1165  // Can be overridden in localconf by SVCONF:
1166  $authInfo['db_user']['table'] = ‪$this->user_table;
1167  $authInfo['db_user']['userid_column'] = ‪$this->userid_column;
1168  $authInfo['db_user']['username_column'] = ‪$this->username_column;
1169  $authInfo['db_user']['userident_column'] = ‪$this->userident_column;
1170  $authInfo['db_user']['enable_clause'] = $this->‪userConstraints()->buildExpression(
1171  [$this->user_table => $this->user_table],
1172  $expressionBuilder
1173  );
1174  return $authInfo;
1175  }
1176 
1190  public function ‪writelog($type, $action, $error, $details_nr, ‪$details, $data, $tablename, $recuid, $recpid) {}
1191 
1203  public function ‪setBeUserByUid(‪$uid)
1204  {
1205  $this->user = $this->‪getRawUserByUid(‪$uid);
1206  }
1215  public function ‪setBeUserByName(‪$name)
1216  {
1217  $this->user = $this->‪getRawUserByName(‪$name) ?: null;
1218  }
1219 
1227  public function ‪getRawUserByUid(‪$uid)
1228  {
1229  $query = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->user_table);
1230  $query->setRestrictions($this->‪userConstraints());
1231  $query->select('*')
1232  ->from($this->user_table)
1233  ->where($query->expr()->eq($this->userid_column, $query->createNamedParameter(‪$uid, ‪Connection::PARAM_INT)));
1234 
1235  return $query->executeQuery()->fetchAssociative();
1236  }
1246  public function ‪getRawUserByName(‪$name)
1247  {
1248  $query = GeneralUtility::makeInstance(ConnectionPool::class)->getQueryBuilderForTable($this->user_table);
1249  $query->setRestrictions($this->‪userConstraints());
1250  $query->select('*')
1251  ->from($this->user_table)
1252  ->where($query->expr()->eq($this->username_column, $query->createNamedParameter(‪$name)));
1254  return $query->executeQuery()->fetchAssociative();
1255  }
1256 
1257  public function ‪getUserId(): ?int
1258  {
1259  if (isset($this->user[$this->userid_column])) {
1260  return (int)$this->user[‪$this->userid_column];
1261  }
1262  return null;
1263  }
1264 
1265  public function ‪getUserName(): ?string
1266  {
1267  if (isset($this->user[$this->username_column])) {
1268  return (string)$this->user[‪$this->username_column];
1269  }
1270  return null;
1271  }
1272 
1273  public function ‪getSession(): UserSession
1274  {
1275  return ‪$this->userSession;
1276  }
1277 }
‪TYPO3\CMS\Core\Context\SecurityAspect\provideIn
‪static provideIn(Context $context)
Definition: SecurityAspect.php:41
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\initializeUserSessionManager
‪initializeUserSessionManager(?UserSessionManager $userSessionManager=null)
Definition: AbstractUserAuthentication.php:220
‪TYPO3\CMS\Core\Database\Query\Restriction\PageIdListRestriction
Definition: PageIdListRestriction.php:27
‪TYPO3\CMS\Core\Database\Query\Restriction\HiddenRestriction
Definition: HiddenRestriction.php:27
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$checkPid
‪bool $checkPid
Definition: AbstractUserAuthentication.php:153
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\fetchPossibleUsers
‪fetchPossibleUsers(array $loginData, bool $activeLogin, bool $isExistingSession, ?array $authenticatedUserFromSession, ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:600
‪TYPO3\CMS\Core\Authentication\Event\AfterUserLoggedOutEvent
Definition: AfterUserLoggedOutEvent.php:26
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\logoff
‪logoff()
Definition: AbstractUserAuthentication.php:805
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\removeSensitiveLoginDataForLoggingInfo
‪mixed removeSensitiveLoginDataForLoggingInfo($data, bool $isUserRecord=false)
Definition: AbstractUserAuthentication.php:1110
‪TYPO3\CMS\Core\Database\Connection\PARAM_INT
‪const PARAM_INT
Definition: Connection.php:52
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$loginType
‪string $loginType
Definition: AbstractUserAuthentication.php:185
‪TYPO3\CMS\Core\Http\Remove
‪@ Remove
Definition: SetCookieBehavior.php:27
‪TYPO3\CMS\Core\Authentication\MimicServiceInterface
Definition: MimicServiceInterface.php:21
‪TYPO3\CMS\Core\Authentication\Event\LoginAttemptFailedEvent
Definition: LoginAttemptFailedEvent.php:27
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\createUserSession
‪UserSession createUserSession(array $userRecordCandidate)
Definition: AbstractUserAuthentication.php:727
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\updateLoginTimestamp
‪updateLoginTimestamp(int $userId)
Definition: AbstractUserAuthentication.php:743
‪TYPO3\CMS\Core\Http\SetCookieBehavior
‪SetCookieBehavior
Definition: SetCookieBehavior.php:24
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\appendCookieToResponse
‪appendCookieToResponse(ResponseInterface $response, ?NormalizedParams $normalizedParams=null)
Definition: AbstractUserAuthentication.php:276
‪TYPO3\CMS\Core\Database\Query\Restriction\EndTimeRestriction
Definition: EndTimeRestriction.php:27
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\fetchValidUserFromSessionOrDestroySession
‪fetchValidUserFromSessionOrDestroySession(bool $skipSessionUpdate=false)
Definition: AbstractUserAuthentication.php:765
‪TYPO3\CMS\Webhooks\Message\$details
‪identifier readonly UriInterface readonly array $details
Definition: MfaVerificationErrorOccurredMessage.php:37
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getRawUserByUid
‪array getRawUserByUid($uid)
Definition: AbstractUserAuthentication.php:1207
‪TYPO3\CMS\Core\Exception
Definition: Exception.php:21
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$checkPid_value
‪int string null $checkPid_value
Definition: AbstractUserAuthentication.php:158
‪TYPO3\CMS\Core\Database\Query\Restriction\StartTimeRestriction
Definition: StartTimeRestriction.php:27
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getModuleData
‪mixed getModuleData(string $module, string $type='')
Definition: AbstractUserAuthentication.php:983
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$userGroups
‪array $userGroups
Definition: AbstractUserAuthentication.php:174
‪TYPO3\CMS\Core\Session\UserSession
Definition: UserSession.php:45
‪TYPO3\CMS\Core\Authentication
Definition: AbstractAuthenticationService.php:16
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getUserName
‪getUserName()
Definition: AbstractUserAuthentication.php:1245
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$username_column
‪string $username_column
Definition: AbstractUserAuthentication.php:87
‪TYPO3\CMS\Core\Exception
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\pushModuleData
‪pushModuleData(string $module, mixed $data, bool $dontPersistImmediately=false)
Definition: AbstractUserAuthentication.php:962
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getUserId
‪getUserId()
Definition: AbstractUserAuthentication.php:1237
‪TYPO3\CMS\Core\Authentication\LOGOUT
‪@ LOGOUT
Definition: LoginType.php:26
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\__construct
‪__construct()
Definition: AbstractUserAuthentication.php:206
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\checkAuthentication
‪checkAuthentication(ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:357
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writelog
‪writelog($type, $action, $error, $details_nr, $details, $data, $tablename, $recuid, $recpid)
Definition: AbstractUserAuthentication.php:1170
‪TYPO3\CMS\Core\Database\Query\Restriction\QueryRestrictionContainerInterface
Definition: QueryRestrictionContainerInterface.php:25
‪TYPO3\CMS\Core\SysLog\Action\Login
Definition: Login.php:24
‪TYPO3\CMS\Core\Context\Context
Definition: Context.php:54
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getAuthServiceConfiguration
‪getAuthServiceConfiguration()
Definition: AbstractUserAuthentication.php:343
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$formfield_uident
‪string $formfield_uident
Definition: AbstractUserAuthentication.php:132
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$enablecolumns
‪array $enablecolumns
Definition: AbstractUserAuthentication.php:113
‪TYPO3\CMS\Core\Authentication\Event\BeforeRequestTokenProcessedEvent
Definition: BeforeRequestTokenProcessedEvent.php:28
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$userSessionManager
‪UserSessionManager $userSessionManager
Definition: AbstractUserAuthentication.php:194
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$formfield_status
‪string $formfield_status
Definition: AbstractUserAuthentication.php:138
‪TYPO3\CMS\Core\Security\RequestToken
Definition: RequestToken.php:26
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getLoginFormData
‪array getLoginFormData(ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:1047
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\performLogoff
‪performLogoff()
Definition: AbstractUserAuthentication.php:826
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\isMfaSetupRequired
‪isMfaSetupRequired()
Definition: AbstractUserAuthentication.php:672
‪TYPO3\CMS\Core\Context\SecurityAspect
Definition: SecurityAspect.php:30
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setSessionData
‪setSessionData($key, $data)
Definition: AbstractUserAuthentication.php:1017
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$usergroup_table
‪string $usergroup_table
Definition: AbstractUserAuthentication.php:82
‪TYPO3\CMS\Core\Database\Query\Restriction\RootLevelRestriction
Definition: RootLevelRestriction.php:27
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\unpack_uc
‪unpack_uc()
Definition: AbstractUserAuthentication.php:943
‪TYPO3\CMS\Webhooks\Message\$loginData
‪identifier readonly UriInterface readonly array $loginData
Definition: LoginErrorOccurredMessage.php:37
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$userSession
‪UserSession $userSession
Definition: AbstractUserAuthentication.php:192
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\isSetSessionCookie
‪bool isSetSessionCookie()
Definition: AbstractUserAuthentication.php:324
‪TYPO3\CMS\Core\Authentication\Mfa\MfaRequiredException
Definition: MfaRequiredException.php:29
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\start
‪start(ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:235
‪TYPO3\CMS\Core\SysLog\Error
Definition: Error.php:24
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$usergroup_column
‪string $usergroup_column
Definition: AbstractUserAuthentication.php:102
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getSessionData
‪mixed getSessionData($key)
Definition: AbstractUserAuthentication.php:1005
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getSession
‪getSession()
Definition: AbstractUserAuthentication.php:1253
‪TYPO3\CMS\Core\Session\UserSessionManager\create
‪static static create(string $loginType, int $sessionLifetime=null, SessionManager $sessionManager=null, IpLocker $ipLocker=null)
Definition: UserSessionManager.php:345
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$setCookie
‪SetCookieBehavior $setCookie
Definition: AbstractUserAuthentication.php:199
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setAndSaveSessionData
‪setAndSaveSessionData($key, $data)
Definition: AbstractUserAuthentication.php:1029
‪TYPO3\CMS\Core\Core\Environment\isCli
‪static isCli()
Definition: Environment.php:145
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$name
‪string $name
Definition: AbstractUserAuthentication.php:72
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\shallSetSessionCookie
‪shallSetSessionCookie()
Definition: AbstractUserAuthentication.php:312
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$writeAttemptLog
‪bool $writeAttemptLog
Definition: AbstractUserAuthentication.php:148
‪TYPO3\CMS\Core\Security\RequestToken\getSigningSecretIdentifier
‪getSigningSecretIdentifier()
Definition: RequestToken.php:115
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\enforceNewSessionId
‪enforceNewSessionId()
Definition: AbstractUserAuthentication.php:794
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$user
‪array null $user
Definition: AbstractUserAuthentication.php:169
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\evaluateMfaRequirements
‪evaluateMfaRequirements()
Definition: AbstractUserAuthentication.php:651
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getAuthServices
‪Traversable getAuthServices(string $subType, array $loginData, ?array $authenticatedUserFromSession, ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:684
‪TYPO3\CMS\Core\Database\Connection
Definition: Connection.php:41
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$loginSessionStarted
‪bool $loginSessionStarted
Definition: AbstractUserAuthentication.php:164
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$lastLogin_column
‪string $lastLogin_column
Definition: AbstractUserAuthentication.php:108
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$userident_column
‪string $userident_column
Definition: AbstractUserAuthentication.php:92
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\isRefreshTimeBasedCookie
‪bool isRefreshTimeBasedCookie()
Definition: AbstractUserAuthentication.php:335
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\regenerateSessionId
‪regenerateSessionId()
Definition: AbstractUserAuthentication.php:710
‪TYPO3\CMS\Webhooks\Message\$uid
‪identifier readonly int $uid
Definition: PageModificationMessage.php:35
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\userConstraints
‪userConstraints()
Definition: AbstractUserAuthentication.php:876
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Core\Database\Query\Restriction\DeletedRestriction
Definition: DeletedRestriction.php:28
‪TYPO3\CMS\Core\Core\Environment
Definition: Environment.php:41
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\isActiveLogin
‪isActiveLogin(ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:1063
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$userid_column
‪string $userid_column
Definition: AbstractUserAuthentication.php:97
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\removeCookie
‪removeCookie($cookieName=null)
Definition: AbstractUserAuthentication.php:844
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\isCookieSet
‪bool isCookieSet()
Definition: AbstractUserAuthentication.php:856
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$dontSetCookie
‪bool $dontSetCookie
Definition: AbstractUserAuthentication.php:180
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getAuthInfoArray
‪array getAuthInfoArray(ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:1134
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setSessionCookie
‪setSessionCookie()
Definition: AbstractUserAuthentication.php:303
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\processLoginData
‪array processLoginData(array $loginData, ServerRequestInterface $request)
Definition: AbstractUserAuthentication.php:1076
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setBeUserByUid
‪setBeUserByUid($uid)
Definition: AbstractUserAuthentication.php:1183
‪TYPO3\CMS\Core\Database\ConnectionPool
Definition: ConnectionPool.php:46
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setBeUserByName
‪setBeUserByName($name)
Definition: AbstractUserAuthentication.php:1195
‪TYPO3\CMS\Core\Utility\GeneralUtility
Definition: GeneralUtility.php:52
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$uc
‪array $uc
Definition: AbstractUserAuthentication.php:190
‪TYPO3\CMS\Core\Utility\StringUtility
Definition: StringUtility.php:24
‪TYPO3\CMS\Core\Utility\StringUtility\filter
‪static filter(mixed $value, ?string $default=null)
Definition: StringUtility.php:48
‪TYPO3\CMS\Core\Authentication\MimicServiceInterface\mimicAuthUser
‪bool mimicAuthUser()
‪TYPO3\CMS\Core\Http\NormalizedParams\createFromRequest
‪static static createFromRequest(ServerRequestInterface $request, array $systemConfiguration=null)
Definition: NormalizedParams.php:840
‪TYPO3\CMS\Core\Crypto\HashService
Definition: HashService.php:27
‪TYPO3\CMS\Core\Utility\GeneralUtility\intExplode
‪static list< int > intExplode(string $delimiter, string $string, bool $removeEmptyValues=false)
Definition: GeneralUtility.php:756
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$writeStdLog
‪bool $writeStdLog
Definition: AbstractUserAuthentication.php:143
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$formfield_uname
‪string $formfield_uname
Definition: AbstractUserAuthentication.php:126
‪TYPO3\CMS\Core\Authentication\Event\BeforeUserLogoutEvent
Definition: BeforeUserLogoutEvent.php:29
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\$user_table
‪string $user_table
Definition: AbstractUserAuthentication.php:77
‪TYPO3\CMS\Core\Session\UserSessionManager
Definition: UserSessionManager.php:46
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\getRawUserByName
‪array getRawUserByName($name)
Definition: AbstractUserAuthentication.php:1226
‪TYPO3\CMS\Core\Http\NormalizedParams
Definition: NormalizedParams.php:38
‪TYPO3\CMS\Core\SysLog\Type
Definition: Type.php:28
‪TYPO3\CMS\Core\Database\Query\Restriction\DefaultRestrictionContainer
Definition: DefaultRestrictionContainer.php:24
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication
Definition: AbstractUserAuthentication.php:65
‪TYPO3\CMS\Core\Authentication\Mfa\MfaProviderRegistry
Definition: MfaProviderRegistry.php:28
‪TYPO3\CMS\Core\Database\Connection\PARAM_LOB
‪const PARAM_LOB
Definition: Connection.php:62
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\writeUC
‪writeUC()
Definition: AbstractUserAuthentication.php:922