- Fixed the all() function of session

- Defined default session cookie to 12hours
This commit is contained in:
Dave Mc Nicoll 2020-05-20 15:34:12 -04:00
parent 128363c476
commit 754349f523
2 changed files with 6 additions and 1 deletions

View File

@ -33,6 +33,11 @@ class Session
$_SESSION = [];
}
public static function all() : array
{
return $_SESSION;
}
public static function start(array $options, Cookie $cookie, string $savePath) : void
{
session_save_path($savePath);

View File

@ -16,7 +16,7 @@ class SessionMiddleware implements MiddlewareInterface
'domain' => null,
'secure' => false,
'httponly' => true,
'lifetime' => 28800, # A day of work ~ 8 hours
'lifetime' => 43200, # A half-day
'samesite' => "",
];