Package Data | |
---|---|
Maintainer Username: | codybuell |
Maintainer Contact: | cody@codybuell.com (codybuell) |
Package Create Date: | 2017-08-16 |
Package Last Update: | 2017-08-18 |
Language: | PHP |
License: | MIT |
Last Refreshed: | 2024-11-23 03:03:14 |
Package Statistics | |
---|---|
Total Downloads: | 1 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 3 |
Total Forks: | 1 |
Total Open Issues: | 0 |
Laravel package for using Hashicorp's Vault as an Authentication Provider. Authenticates users against an instance of Vault, stores user information in the session, and handles closing of the laravel session when the vault ttl expires. Built and tested with Laravel 5.4.
Install the LaravaultAuth package manually or with composer:
Composer
composer require codybuell/laravault-auth
Manually
git clone https://github.com/codybuell/laravault-auth.git vendor/codybuell/laravault-auth
# edit composer.json, under autoload -> psr-4 append:
"CodyBuell\\LaravaultAuth\\": "vendor/codybuell/laravault-auth/src"
Add provider to config/app.php
providers array:
CodyBuell\LaravaultAuth\LaravaultAuthServiceProvider::class,
Publish config and configure config/laravault-auth.php
:
php artisan vendor:publish
Set 'vault' as your auth provider in config/auth.php
:
'providers' => [
'users' => [
'driver' => 'vault',
],
]
Set auth to use username rather than email. In app/Http/Controllers/Auth/LoginController.php
add:
/**
* Use usernames instead of emails.
*/
public function username() {
return 'username';
}