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

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

nobelatunje/jwt
===============

JWT Package for Laravel and Lumen

1.0.0(3y ago)844MITPHPPHP ^8.0.2

Since Aug 26Pushed 3y ago1 watchersCompare

[ Source](https://github.com/Atunje/nobelatunje_jwt)[ Packagist](https://packagist.org/packages/nobelatunje/jwt)[ RSS](/packages/nobelatunje-jwt/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (1)Dependencies (5)Versions (3)Used By (0)

Nobelatunje/Jwt
===============

[](#nobelatunjejwt)

A simple JSON Web Token Authentication Library built on top of **[lcobucci/jwt](https://github.com/lcobucci/jwt)** for Laravel and Lumen.

It uses Asymmetric Algorithm using a **private key** for signature creation and a **public key** for verification. This means that it's fine to distribute your **public key**. However, the **private key** should **remain secret**.

Laravel Installation
--------------------

[](#laravel-installation)

Via composer

```
composer require nobelatunje/jwt

```

Install the package

```
php artisan jwt:install

```

Generate private and public keys

```
php artisan jwt:generate

```

Modify the jwtconfig.php in your config file as necessary and add your app's Policies if necessary.

Change the route driver in your auth.php config file to jwt.

```
'guards' => [
    'custom_guard' => [
        'driver' => 'jwt',
        'provider' => 'users',
    ],
],

```

Auth Guard Usage
----------------

[](#auth-guard-usage)

### Routing

[](#routing)

```
Route::middleware('auth:custom_guard')->get('/user', function (Request $request) {
    return $request->user();
});

//if you set jwt as driver for your api guard
Route::middleware('auth:api')->get('/user', function (Request $request) {
    return $request->user();
});

```

### Login

[](#login)

```
// Generate a token for the user if the credentials are valid
$token = Auth::attempt($credentials);

```

### User

[](#user)

```
// Get the currently authenticated user
$user = Auth::user();

```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity53

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

Unknown

Total

1

Last Release

1352d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/82bf25b377d2e62c977b45b7665300ef8117afe9ed26fe24bd2449bd15ffb2a0?d=identicon)[nobelatunje](/maintainers/nobelatunje)

---

Top Contributors

[![Atunje](https://avatars.githubusercontent.com/u/12198695?v=4)](https://github.com/Atunje "Atunje (17 commits)")

---

Tags

authenticationjwtjwt-authenticationlaravelphpjwtlaravellumenlcobuccinobelatunje

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

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

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M344](/packages/tymon-jwt-auth)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M52](/packages/php-open-source-saver-jwt-auth)[jeremy379/laravel-openid-connect

OpenID Connect support to the PHP League's OAuth2 Server. Compatible with Laravel Passport.

55342.3k2](/packages/jeremy379-laravel-openid-connect)[generationtux/jwt-artisan

JWT auth package for Laravel and Lumen

13953.1k](/packages/generationtux-jwt-artisan)

PHPackages © 2026

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