golem / auth-storage-zend
Zend Session storage adapter for Golem Auth
2.0.0
2017-05-08 22:14 UTC
Requires
- php: ~5.6|~7.0
- golem/auth: ^1.0|^2.0
- zendframework/zend-session: ^2.7
Requires (Dev)
- phpunit/phpunit: ^5.5
- squizlabs/php_codesniffer: ^2.7
This package is auto-updated.
Last update: 2024-11-12 14:22:24 UTC
README
Zend Framework - Zend Session storage adapter for Golem Auth
Install
Via Composer
$ composer require golem/auth-storage-zend
Usage
Follow the documentation on Golem Auth to create a user model and a user repository class.
$session = new \Zend\Session\Container(); $storage = new \Golem\Auth\Storage\ZendSessionStorage($session); // 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.