Laravel JWT Auth Guard
, (*1)
This package provides an authentication guard for the tymon/jwt-auth package (< 1.0.0) when using Laravel or Lumen 5.3., (*2)
NOTE: The tymon/jwt-auth package as of 1.0.* supplies its own guard., (*3)
Installation
Before you can use this package, you must configure the jwt-auth package according to the project WIKI., (*4)
Once you have installed and configured the jtw-auth package, add lukevear/jwt-auth-guard to your composer.json:, (*5)
"lukevear/jwt-auth-guard": "1.*"
Then you can run composer update to grab the latest and greatest version., (*6)
Alternatively, you may install this package directly from the command line:, (*7)
composer require "lukevear/jwt-auth-guard:1.*"
You'll need need to activate the service provider, which you can do in config/app.php:, (*8)
'providers' => [
...
LukeVear\JWTAuthGuard\JWTAuthGuardServiceProvider::class,
]
Finally, configure the authentication guard in config/auth.php:, (*9)
'guards' => [
...
'api' => [
'driver' => 'jwt-auth',
...
],
],
What's next?
Enjoy JWT based token authentication in your Laravel/Lumen 5.3 application!, (*10)