Skip to content

raditzfarhan/simple-jwt-auth

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Latest Version License styleci

Simple JWT Auth

Just a simple implementation of JWT Auth for Lumen

Configuration

Edit the bootstrap/app.php file and add the following line to register the service provider:

...
$app->register(RaditzFarhan\SimpleJWTAuth\JWTAuthServiceProvider::class);
...

Then add jwt to your guards config in auth.php config file:

'guards' => [
    ...    
    'jwt' => [
        'driver' => 'simple-jwt-auth',
        'provider' => 'users',
    ],
],

Then add users provider if you haven't:

'providers' => [
    'users' => [
        'driver' => 'eloquent',
        'model' => App\User::class,
    ],
],

Credits

License

MIT. Please see the license file for more information.

About

Just a simple implementation of JWT Auth for Laravel and Lumen

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages