cvogit / lumen-jwt
An implementation of firebase/php-jwt for Lumen, a Laravel micro framework.
v1.0.3
2017-10-13 17:52 UTC
Requires
- php: ^7.0
- firebase/php-jwt: v5.0.0
Requires (Dev)
- phpunit/phpunit: ^6.2
This package is not auto-updated.
Last update: 2025-04-13 05:49:40 UTC
README
LumenJWT is an Http guard for Lumen, a Laravel micro framework.
- Create JWT using firebase/php-jwt
- Guard Http requests
Dependencies
- [firebase/php-jwt] - A simple library to encode and decode JSON Web Tokens (JWT) in PHP, conforming to RFC 7519.
- [php] - v5.6 +
Installation
Use Composer to install LumenJWT and its the dependencies.
$ composer require cvogit/LumenJWT $ composer install
Configuration
In bootstrap/app.php enable the middleware:
$app->routeMiddleware([
'jwt' => Cvogit\LumenJWT\Http\Middleware\JwtGuard::class,
]);
In .env
- Create
JWT_KEY
and give it a random string. - Create
JWT_EXP
, set the time until the token expire in seconds, if not set the default is 7200 seconds.
Usage
Please visit the Wiki.
Todos
- Add blacklist option
License
MIT