middlewares/aura-session

Middleware to manage sessions using Aura.Session

Package info

github.com/middlewares/aura-session

pkg:composer/middlewares/aura-session

Statistics

Installs: 58 063

Dependents: 0

Suggesters: 0

Stars: 5

Open Issues: 0

v2.1.0 2025-03-23 10:30 UTC

Requires

Suggests

None

Provides

None

Conflicts

None

Replaces

None

MIT ef6dfabe101b3faf912647e085a36c5c106e2a0f

httpservermiddlewaresessionpsr-7psr-15aura.session

This package is auto-updated.

Last update: 2026-06-13 12:32:34 UTC


README

👁 Latest Version on Packagist
👁 Software License
👁 Testing
👁 Total Downloads
![SensioLabs Insight][ico-sensiolabs]

Middleware to manage sessions using Aura.Session.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/aura-session.

composer require middlewares/aura-session

Example

$dispatcher = new Dispatcher([
 new Middlewares\AuraSession(),

 function ($request) {
 //get the session object
 $session = $request->getAttribute('session');
 }
]);

$response = $dispatcher->dispatch(new ServerRequest());

Options

__construct(Aura\Session\SessionFactory $factory = null)

To use a custom session factory. If it's not passed, it will be created automatically.

name(string $name)

The session name. If it's not defined, the default PHPSESSID will be used.

attribute(string $attribute)

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.