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 3w 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 21% 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

1890d 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

[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[firefly-iii/data-importer

Firefly III Data Import Tool.

8015.8k](/packages/firefly-iii-data-importer)[rainlab/user-plugin

User plugin for October CMS

11955.0k15](/packages/rainlab-user-plugin)

PHPackages © 2026

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