You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Middleware to start a php session using the request data and close it after returning the response. Reads and writes session cookies in the PSR-7 request/response.
// Start the session with a specific session id$session = (newMiddlewares\PhpSession())->options([
'cookie_lifetime' => 86400
]);
regenerateId
This option regenerates the id after a specific time interval. The latest regeneration time is saved in the key session-id-expires but you can change it in the second argument:
// Regenerate the session id after 60 seconds$session = (newMiddlewares\PhpSession())->regenerateId(60);
// Regenerate the session id after 60 seconds, storing the expires date in the key 'expiresAt'$session = (newMiddlewares\PhpSession())->regenerateId(60, 'expiresAt');
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.
About
PSR-15 middleware to create a php session using the request data