diff options
| author | André Noack <noack@data-quest.de> | 2024-12-12 14:52:00 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2024-12-12 14:52:00 +0000 |
| commit | 940d2aaa8638b4e0c764579cb3977e7be527c81f (patch) | |
| tree | 79bd2d7f02359e1bb24931b33513e082f8404a91 /lib/bootstrap-definitions.php | |
| parent | 3a2a88172ccbe97aaecf4ea32b97cd07b92dcb11 (diff) | |
StEP 1552 closes #1552
Closes #1552
Merge request studip/studip!1137
Diffstat (limited to 'lib/bootstrap-definitions.php')
| -rw-r--r-- | lib/bootstrap-definitions.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/bootstrap-definitions.php b/lib/bootstrap-definitions.php index 7d4f93b..06380a8 100644 --- a/lib/bootstrap-definitions.php +++ b/lib/bootstrap-definitions.php @@ -71,6 +71,19 @@ return [ }), PluginManager::class => DI\factory([PluginManager::class, 'getInstance']), + Studip\Session\Manager::class => DI\factory(function () { + if (Config::get()->CACHING_ENABLE && $GLOBALS['CACHE_IS_SESSION_STORAGE']) { + $session_handler = new Studip\Session\CacheSessionHandler($GLOBALS['SESSION_OPTIONS']['lifetime'] ?? null); + } else { + $session_handler = new Studip\Session\DbSessionHandler(); + } + $GLOBALS['SESSION_OPTIONS']['path'] = $GLOBALS['CANONICAL_RELATIVE_PATH_STUDIP']; + $GLOBALS['SESSION_OPTIONS']['secure'] = Request::protocol() == 'https'; + return new Studip\Session\Manager($session_handler, $GLOBALS['SESSION_OPTIONS']); + + }), + Studip\Authentication\Manager::class => DI\create(), + // PSR-17 HTTP Factories \Psr\Http\Message\RequestFactoryInterface::class => DI\get(Psr17Factory::class), \Psr\Http\Message\ResponseFactoryInterface::class => DI\get(Psr17Factory::class), |
