2 declare(strict_types = 1);
52 if (!isset($this->sessionBackends[$identifier])) {
53 $configuration =
$GLOBALS[
'TYPO3_CONF_VARS'][
'SYS'][
'session'][$identifier] ??
false;
54 if (!$configuration) {
55 throw new \InvalidArgumentException(
'Session configuration for identifier ' . $identifier .
' was not found', 1482234750);
61 $sessionBackend->validateConfiguration();
62 $this->sessionBackends[$identifier] = $sessionBackend;
64 return $this->sessionBackends[$identifier];
77 $hashedSessionToRenew =
'';
79 if ($userAuthentication !==
null && (
int)$userAuthentication->user[
'uid'] === $userId) {
80 $sessionToRenew = $userAuthentication->getSessionId();
83 $hashedSessionToRenew = $backend->hash($sessionToRenew);
86 foreach ($backend->
getAll() as $session) {
87 if ($userAuthentication !==
null) {
88 if ($session[
'ses_id'] === $sessionToRenew || $session[
'ses_id'] === $hashedSessionToRenew) {
89 $userAuthentication->enforceNewSessionId();
93 if ((
int)$session[
'ses_userid'] === $userId) {
94 $backend->
remove($session[
'ses_id']);
109 $className = $configuration[
'backend'];
111 if (!is_subclass_of($className, SessionBackendInterface::class)) {
112 throw new \InvalidArgumentException(
'Configured session backend ' . $className .
' does not implement ' . SessionBackendInterface::class, 1482235035);
115 $options = $configuration[
'options'] ?? [];
118 $backend = GeneralUtility::makeInstance($className);