golem/auth-storage-aura

Aura Session storage adapter for Golem Auth

2.0.0 2017-05-08 22:14 UTC

This package is auto-updated.

Last update: 2024-11-12 13:33:10 UTC


README

Latest Stable Version Build Status Code Coverage Scrutinizer Code Quality SensioLabsInsight

Aura Session storage adapter for Golem Auth

Install

Via Composer

$ composer require golem/auth-storage-aura

Usage

Follow the documentation on Golem Auth to create a user model and a user repository class.

$session_factory = new \Aura\Session\SessionFactory;
$session = $session_factory->newInstance($_COOKIE);
$segment = $session->getSegment('Golem\Auth');
$this->storage = new AuraSessionStorage($segment);
// get an instance of your user repository however you need to
$userRepository = new UserRepository($database_connection);
$auth = new \Golem\Auth($storage, $userRepository);

Testing

$ composer test

License

The MIT License (MIT). Please see License File for more information.