- Fixed the all() function of session
- Defined default session cookie to 12hours
This commit is contained in:
parent
128363c476
commit
754349f523
|
@ -32,6 +32,11 @@ class Session
|
||||||
{
|
{
|
||||||
$_SESSION = [];
|
$_SESSION = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public static function all() : array
|
||||||
|
{
|
||||||
|
return $_SESSION;
|
||||||
|
}
|
||||||
|
|
||||||
public static function start(array $options, Cookie $cookie, string $savePath) : void
|
public static function start(array $options, Cookie $cookie, string $savePath) : void
|
||||||
{
|
{
|
||||||
|
|
|
@ -16,7 +16,7 @@ class SessionMiddleware implements MiddlewareInterface
|
||||||
'domain' => null,
|
'domain' => null,
|
||||||
'secure' => false,
|
'secure' => false,
|
||||||
'httponly' => true,
|
'httponly' => true,
|
||||||
'lifetime' => 28800, # A day of work ~ 8 hours
|
'lifetime' => 43200, # A half-day
|
||||||
'samesite' => "",
|
'samesite' => "",
|
||||||
];
|
];
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue