https://github.com/spekkionu/golem-auth-storage-aura
https://github.com/spekkionu/golem-auth-storage-aura
auth authentication golem-auth php
Last synced: 6 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/spekkionu/golem-auth-storage-aura
- Owner: spekkionu
- License: mit
- Created: 2016-10-21T05:20:25.000Z (over 9 years ago)
- Default Branch: master
- Last Pushed: 2017-12-23T04:24:49.000Z (over 8 years ago)
- Last Synced: 2024-11-30T16:09:17.108Z (over 1 year ago)
- Topics: auth, authentication, golem-auth, php
- Language: PHP
- Size: 5.86 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Golem Auth
[](https://packagist.org/packages/golem/auth-storage-aura)
[](https://travis-ci.org/spekkionu/golem-auth-storage-aura)
[](https://scrutinizer-ci.com/g/spekkionu/golem-auth-storage-aura/?branch=master)
[](https://scrutinizer-ci.com/g/spekkionu/golem-auth-storage-aura/?branch=master)
[](https://insight.sensiolabs.com/projects/413b7245-efc7-4c63-bacb-e106e5d80f6d)
Aura Session storage adapter for Golem Auth
## Install
Via Composer
``` bash
$ composer require golem/auth-storage-aura
```
## Usage
Follow the documentation on [Golem Auth](https://github.com/spekkionu/golem-auth) to create a user model and a user repository class.
``` php
$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
``` bash
$ composer test
```
## License
The MIT License (MIT). Please see [License File](LICENSE.md) for more information.