raditzfarhan/simple-jwt-auth

Just a simple jwt auth for Laravel and Lumen

Installs: 218

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 1

Forks: 0

Open Issues: 1

Type:laravel-package

v1.0.0 2020-04-16 08:09 UTC

This package is auto-updated.

Last update: 2024-04-17 18:42:31 UTC


README

68747470733a2f2f7265732e636c6f7564696e6172792e636f6d2f72616469747a66617268616e2f696d6167652f75706c6f61642f76313538373030373637392f73696d706c652d6a77742d617574685f67706f3076642e737667

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.