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 2mo 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

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity18

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity45

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

2225d 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/ui

Laravel UI utilities and presets.

2.7k134.9M601](/packages/laravel-ui)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[casbin/laravel-authz

An authorization library that supports access control models like ACL, RBAC, ABAC in Laravel.

324339.9k4](/packages/casbin-laravel-authz)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[scaler-tech/laravel-saml2

SAML2 Service Provider integration for Laravel applications, based on OneLogin toolkit

2737.5k](/packages/scaler-tech-laravel-saml2)

PHPackages © 2026

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