Refactor Session Handling (make it more simple & handler are now handler again)

This commit is contained in:
nupplaPhil 2019-12-11 20:30:31 +01:00
parent 02c40ad1cb
commit 1408908c84
No known key found for this signature in database
GPG key ID: D8365C3D36B77D90
11 changed files with 143 additions and 140 deletions

View file

@ -32,13 +32,13 @@ class Cookie
/** @var array The $_COOKIE array */
private $cookie;
public function __construct(Configuration $config, array $server = [], array $cookie = [])
public function __construct(Configuration $config, App\BaseURL $baseURL, array $server = [], array $cookie = [])
{
if (!empty($server['REMOTE_ADDR'])) {
$this->remoteAddr = $server['REMOTE_ADDR'];
}
$this->sslEnabled = $config->get('system', 'ssl_policy') === App\BaseURL::SSL_POLICY_FULL;
$this->sslEnabled = $baseURL->getSSLPolicy() === App\BaseURL::SSL_POLICY_FULL;
$this->sitePrivateKey = $config->get('system', 'site_prvkey');
$authCookieDays = $config->get('system', 'auth_cookie_lifetime',