golem / auth-storage-aura
Aura Session storage adapter for Golem Auth
2.0.0
2017-05-08 22:14 UTC
Requires
- php: ~5.6|~7.0
- aura/session: ^2.1
- golem/auth: ^1.0|^2.0
Requires (Dev)
- phpunit/phpunit: ^5.5
- squizlabs/php_codesniffer: ^2.7
This package is auto-updated.
Last update: 2024-11-12 13:33:10 UTC
README
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.