Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Laravault Auth Laravel Package

codybuell/laravault-auth

Laravel 5.4 auth provider that authenticates users against Hashicorp Vault. Stores user info in the Laravel session, tracks Vault TTL, and ends the Laravel session when the Vault token expires. Configurable as an auth driver via config/auth.php.

View on GitHub
Deep Wiki
Context7

Laravault-Auth

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.

Installation

  1. 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"
      
  2. Add provider to config/app.php providers array:

     CodyBuell\LaravaultAuth\LaravaultAuthServiceProvider::class,
    
  3. Publish config and configure config/laravault-auth.php:

     php artisan vendor:publish
    
  4. Set 'vault' as your auth provider in config/auth.php:

     'providers' => [
         'users' => [
             'driver' => 'vault',
         ],
     ]
    
  5. 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';
     }
    

Usage

Accessing Vault Client Token

Accessing User Attributes

Todo

  • write tests
  • add option to not tie laravel session length to vault ttl
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log