cvogit / lumen-jwt by cvogit

An implementation of firebase/php-jwt for Lumen, a Laravel micro framework.
58
1
0
Package Data
Maintainer Username: cvogit
Maintainer Contact: cvogit@gmail.com (cvogit)
Package Create Date: 2017-09-07
Package Last Update: 2017-11-17
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2025-04-22 03:12:39
Package Statistics
Total Downloads: 58
Monthly Downloads: 0
Daily Downloads: 0
Total Stars: 1
Total Watchers: 0
Total Forks: 1
Total Open Issues: 0

LumenJWT

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