PHPackages                             alejo-lespaul/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. alejo-lespaul/jwt

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

alejo-lespaul/jwt
=================

Jwt Integration for laravel

1.0(5y ago)07MITPHP

Since Apr 30Pushed 5y ago1 watchersCompare

[ Source](https://github.com/AlejoLespaul/jwt)[ Packagist](https://packagist.org/packages/alejo-lespaul/jwt)[ RSS](/packages/alejo-lespaul-jwt/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependencies (2)Versions (2)Used By (0)

JWT For Laravel
===============

[](#jwt-for-laravel)

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

[](#installation)

```
composer require alejo-lespaul/jwt

```

Configuration Key
-----------------

[](#configuration-key)

#### Add in .env file the next key:

[](#add-in-env-file-the-next-key)

```
JWT_SERVICE_KEY="ASecretKey"

```

How use it
----------

[](#how-use-it)

#### Create Token

[](#create-token)

```
use Jwt\Facade\JwtFacade as Jwt;
...
$token = Jwt::signIn([
	"id" => 1
	"username" => "john wick"
	...
]);

# Return a valid token

```

#### Get Data From Token

[](#get-data-from-token)

```
use Jwt\Facade\JwtFacade as Jwt;
...

$data = Jwt::getData($token);
# Return an array or throw an exception if the token is not valid

```

#### Ask if a token is valid

[](#ask-if-a-token-is-valid)

```
use Jwt\Facade\JwtFacade as Jwt;
...

$boolean = Jwt::isValid($token);
# Return true o false

```

Middleware
----------

[](#middleware)

#### Add in app\\Http\\kernel.php:

[](#add-in-apphttpkernelphp)

```
use Jwt\Http\Middleware\JwtMiddleware;
...

    protected $routeMiddleware = [
        ...
        'jwt' => JwtMiddleware::class
    ];

```

- The middleware put the dataToken in the request

```
  $request->input('dataToken');

```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity4

Limited adoption so far

Community4

Small or concentrated contributor base

Maturity52

Maturing project, gaining track record

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

Unknown

Total

1

Last Release

1840d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13680291?v=4)[Alejandro Furgeri](/maintainers/AlejoLespaul)[@AlejoLespaul](https://github.com/AlejoLespaul)

### Embed Badge

![Health badge](/badges/alejo-lespaul-jwt/health.svg)

```
[![Health](https://phpackages.com/badges/alejo-lespaul-jwt/health.svg)](https://phpackages.com/packages/alejo-lespaul-jwt)
```

###  Alternatives

[lab404/laravel-impersonate

Laravel Impersonate is a plugin that allows to you to authenticate as your users.

2.3k16.4M48](/packages/lab404-laravel-impersonate)[santigarcor/laratrust

This package provides a flexible way to add Role-based Permissions to Laravel

2.3k5.4M43](/packages/santigarcor-laratrust)[overtrue/laravel-follow

User follow unfollow system for Laravel.

1.2k404.7k5](/packages/overtrue-laravel-follow)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5161.1M3](/packages/robsontenorio-laravel-keycloak-guard)[kinde-oss/kinde-auth-php

Kinde PHP SDK for authentication

2369.5k3](/packages/kinde-oss-kinde-auth-php)

PHPackages © 2026

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