![SensioLabs Insight][ico-sensiolabs]
Middleware to manage sessions using Aura.Session.
- PHP >= 7.0
- A PSR-7 http message implementation (Diactoros, Guzzle, Slim, etc...)
- A PSR-15 middleware dispatcher
This package is installable and autoloadable via Composer as middlewares/aura-session.
composer require middlewares/aura-session
$dispatcher = new Dispatcher([
new Middlewares\AuraSession(),
function ($request) {
//get the session object
$session = $request->getAttribute('session');
}
]);
$response = $dispatcher->dispatch(new ServerRequest());
To use a custom session factory. If it's not passed, it will be created automatically.
The session name. If it's not defined, the default PHPSESSID
will be used.
The attribute name used to store the session in the server request. By default is session
.
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.