‪TYPO3CMS  ‪main
ReactionUserAuthentication.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\Http\Message\ServerRequestInterface;
23 
31 {
32  public ‪$dontSetCookie = true;
34 
36  {
37  $this->reactionInstruction = ‪$reactionInstruction;
39  $this->‪setBeUserByUid($reactionInstruction->‪getImpersonateUser());
40  }
41  }
42 
43  public function ‪start(ServerRequestInterface $request)
44  {
45  if (empty($this->user['uid'])) {
46  return;
47  }
48  $this->‪unpack_uc();
49  // The groups are fetched and ready for permission checking in this initialization.
50  $this->‪fetchGroupData();
51  $this->‪backendSetUC();
52  }
53 
59  public function ‪checkAuthentication(ServerRequestInterface $request)
60  {
61  // do nothing
62  }
63 
65  {
66  return null;
67  }
68 
69  public function ‪backendCheckLogin(ServerRequestInterface $request = null): void
70  {
71  // do nothing
72  }
73 
80  public function ‪isUserAllowedToLogin(): bool
81  {
82  return (int)‪$GLOBALS['TYPO3_CONF_VARS']['BE']['adminOnly'] === 0;
83  }
84 
85  public function ‪initializeBackendLogin(ServerRequestInterface $request = null): void
86  {
87  throw new \RuntimeException('Login Error: No login possible for reaction.', 1669800914);
88  }
89 }
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\initializeBackendLogin
‪initializeBackendLogin(ServerRequestInterface $request=null)
Definition: ReactionUserAuthentication.php:85
‪TYPO3\CMS\Reactions\Model\ReactionInstruction
Definition: ReactionInstruction.php:27
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\checkAuthentication
‪checkAuthentication(ServerRequestInterface $request)
Definition: ReactionUserAuthentication.php:59
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\fetchGroupData
‪fetchGroupData()
Definition: BackendUserAuthentication.php:949
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication
Definition: ReactionUserAuthentication.php:31
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\$reactionInstruction
‪ReactionInstruction $reactionInstruction
Definition: ReactionUserAuthentication.php:33
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\backendCheckLogin
‪backendCheckLogin(ServerRequestInterface $request=null)
Definition: ReactionUserAuthentication.php:69
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\unpack_uc
‪unpack_uc()
Definition: AbstractUserAuthentication.php:941
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication\backendSetUC
‪backendSetUC()
Definition: BackendUserAuthentication.php:1868
‪TYPO3\CMS\Reactions\Model\ReactionInstruction\getImpersonateUser
‪getImpersonateUser()
Definition: ReactionInstruction.php:52
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\$dontSetCookie
‪$dontSetCookie
Definition: ReactionUserAuthentication.php:32
‪TYPO3\CMS\Core\Authentication\BackendUserAuthentication
Definition: BackendUserAuthentication.php:61
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\isUserAllowedToLogin
‪isUserAllowedToLogin()
Definition: ReactionUserAuthentication.php:80
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\getOriginalUserIdWhenInSwitchUserMode
‪getOriginalUserIdWhenInSwitchUserMode()
Definition: ReactionUserAuthentication.php:64
‪$GLOBALS
‪$GLOBALS['TYPO3_CONF_VARS']['EXTCONF']['adminpanel']['modules']
Definition: ext_localconf.php:25
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\setReactionInstruction
‪setReactionInstruction(ReactionInstruction $reactionInstruction)
Definition: ReactionUserAuthentication.php:35
‪TYPO3\CMS\Reactions\Authentication\ReactionUserAuthentication\start
‪start(ServerRequestInterface $request)
Definition: ReactionUserAuthentication.php:43
‪TYPO3\CMS\Core\Authentication\AbstractUserAuthentication\setBeUserByUid
‪setBeUserByUid($uid)
Definition: AbstractUserAuthentication.php:1179
‪TYPO3\CMS\Reactions\Authentication
Definition: ReactionUserAuthentication.php:18