PHPackages                             lgrevelink/laravel-simple-jwt - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. lgrevelink/laravel-simple-jwt

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

lgrevelink/laravel-simple-jwt
=============================

Utilties for using the php-simple-jwt package in Laravel/Lumen projects.

0.1.2(6y ago)11.8k1MITPHPPHP &gt;=7.1CI failing

Since Aug 31Pushed 6y ago2 watchersCompare

[ Source](https://github.com/LarsGrevelink/laravel-simple-jwt)[ Packagist](https://packagist.org/packages/lgrevelink/laravel-simple-jwt)[ RSS](/packages/lgrevelink-laravel-simple-jwt/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (3)Dependencies (6)Versions (4)Used By (0)

Laravel Simple JWT
==================

[](#laravel-simple-jwt)

[![Test Suite Status](https://github.com/larsgrevelink/laravel-simple-jwt/workflows/Test%20Suite/badge.svg)](https://github.com/larsgrevelink/laravel-simple-jwt)[![Total Downloads](https://camo.githubusercontent.com/e53cc2c7feadba0090e64f1cc86bb7b342555268c657bc23ea19f304ff414857/68747470733a2f2f706f7365722e707567782e6f72672f6c67726576656c696e6b2f6c61726176656c2d73696d706c652d6a77742f642f746f74616c2e737667)](https://packagist.org/packages/lgrevelink/laravel-simple-jwt)[![Latest Stable Version](https://camo.githubusercontent.com/0f7c55892fede505682c1ae65c145084d34e616164aadbb9b1e6ac7c049151ad/68747470733a2f2f706f7365722e707567782e6f72672f6c67726576656c696e6b2f6c61726176656c2d73696d706c652d6a77742f762f737461626c652e737667)](https://packagist.org/packages/lgrevelink/laravel-simple-jwt)[![License](https://camo.githubusercontent.com/143923a856f51e849138988db348b76af6eaec09084382ed418eee451aa76bde/68747470733a2f2f706f7365722e707567782e6f72672f6c67726576656c696e6b2f6c61726176656c2d73696d706c652d6a77742f6c6963656e73652e737667)](https://github.com/larsgrevelink/laravel-simple-jwt)

Laravel and Lumen utilities to kickstart the usage of the [PHP Simple JWT](https://github.com/LarsGrevelink/php-simple-jwt) package.

Supported functionalities;

- Artisan make command for JWT Blueprints (`make:jwt-blueprint`)
- Validator rule for JWT validation

Installation
------------

[](#installation)

```
composer require lgrevelink/laravel-simple-jwt
```

For Laravel
-----------

[](#for-laravel)

Laravel's auto-discovery directly registers the service provider so it should be instantly usable. If you don't use auto-discovery, please add the `SimpleJwtServiceProvider` to the provider array in `config/app.php`.

```
LGrevelink\LaravelSimpleJWT\Providers\SimpleJwtServiceProvider::class
```

Both the artisan command and the validator are directly registered by adding the service provider.

For Lumen
---------

[](#for-lumen)

Using this package in lumen requires you to register the service provider in `bootstrap/app.php`.

```
$app->register(LGrevelink\LaravelSimpleJWT\Providers\SimpleJwtServiceProvider::class);
```

Auto-extending the validator rule **only** works when the Facades have been setup. This can be done by enabling the `withFacades` option in `bootstrap/app.php`. Aliases are not necessary.

```
$app->withFacades();
```

Usage
-----

[](#usage)

### Generator command

[](#generator-command)

After getting set up, generating your first Blueprint is very easy.

```
php artisan make:jwt-blueprint MyFirstBlueprint
```

A series of questions are following setting up the default claims supported by JWT. Values you don't want to use can be left empty and won't be added. The default namespace where the blueprints will be placed is `App\JwtTokens`.

All date-related claims (e.g. expiration time) are treated as relative values from the moment generation. Find more information about the Simple JWT package and its usage [here](https://github.com/LarsGrevelink/php-simple-jwt).

### Validator

[](#validator)

There are 2 general ways of using the validator rule.

**Basic usage**

```
$request->validate([
    'foo' => 'jwt',
    'bar' => new ValidJwt(),
]);
```

This only validates whether the token has a valid JWT structure.

**Blueprint usage**

```
$request->validate([
    'foo' => 'jwt:' . App\JwtTokens\MyFirstBlueprint::class,
    'bar' => new ValidJwt(App\JwtTokens\MyFirstBlueprint::class),
]);
```

This validates the token directly against the given blueprint.

Tests
-----

[](#tests)

Tests are written with PHPUnit and can be run via the following composer command;

```
composer run test
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity46

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~110 days

Total

3

Last Release

2274d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8b94a0369dd7815f25856019b12c61d519816d84af15a34186bb3cb8c6bb65f5?d=identicon)[lgrevelink](/maintainers/lgrevelink)

---

Top Contributors

[![LarsGrevelink](https://avatars.githubusercontent.com/u/1597445?v=4)](https://github.com/LarsGrevelink "LarsGrevelink (14 commits)")

---

Tags

composer-packagejwtjwt-tokenlaravellumenphp

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/lgrevelink-laravel-simple-jwt/health.svg)

```
[![Health](https://phpackages.com/badges/lgrevelink-laravel-simple-jwt/health.svg)](https://phpackages.com/packages/lgrevelink-laravel-simple-jwt)
```

###  Alternatives

[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M131](/packages/laravel-mcp)[laravel/ai

The official AI SDK for Laravel.

1.0k3.2M169](/packages/laravel-ai)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9762.4M123](/packages/roots-acorn)[propaganistas/laravel-disposable-email

Disposable email validator

6012.9M7](/packages/propaganistas-laravel-disposable-email)[yajra/laravel-oci8

Oracle DB driver for Laravel via OCI8

8793.2M23](/packages/yajra-laravel-oci8)[illuminate/queue

The Illuminate Queue package.

21332.6M1.5k](/packages/illuminate-queue)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
