PHPackages                             cesg/jwt-token-guard - 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. cesg/jwt-token-guard

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

cesg/jwt-token-guard
====================

Laravel simple JWT token guard

v0.5.0(3y ago)01.5kMITPHPPHP ^7.4|^8.0|^8.1CI failing

Since Jan 25Pushed 3y ago1 watchersCompare

[ Source](https://github.com/cesg/jwt-token-guard)[ Packagist](https://packagist.org/packages/cesg/jwt-token-guard)[ RSS](/packages/cesg-jwt-token-guard/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (7)Versions (7)Used By (0)

jwt-token-guard
===============

[](#jwt-token-guard)

Laravel simple JWT token guard

Install
=======

[](#install)

```
composer require cesg/jwt-token-guard
```

Configure
=========

[](#configure)

Configure the auth driver

```
'api' => [
    'driver' => 'jwt',
    'provider' => 'users',
    'key' => env('JWT_KEY', \md5(env('APP_NAME'))),
],
```

Example secret key

```
openssl rand -hex 64
```

Usage
=====

[](#usage)

Javascript
----------

[](#javascript)

```
const token = '';
axios.defaults.headers.common['Authorization'] = `Bearer ${token}`;
```

Laravel
-------

[](#laravel)

```
protected function authenticated(Request $request, $user)
{
    $jwt = JWT::encode([
        'sub' => $user->getAuthIdentifier(),
        'iss' => config('app.name'),
        'iat' => now()->timestamp,
    ], config('auth.guards.api.key'));

    session(\compact('jwt'));
}
```

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity60

Established project with proven stability

 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 ~219 days

Recently: every ~272 days

Total

6

Last Release

1202d ago

PHP version history (4 changes)v0.1.0PHP ^7.2

v0.3.0PHP ^7.3

v0.4.0PHP ^7.4|^8.0

v0.5.0PHP ^7.4|^8.0|^8.1

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc7b0f295d45cfc290ee707077214196c93ef640088c89331bbd2204766dc27e?d=identicon)[cesg](/maintainers/cesg)

---

Top Contributors

[![cesg](https://avatars.githubusercontent.com/u/896275?v=4)](https://github.com/cesg "cesg (18 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/cesg-jwt-token-guard/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[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)[kovah/laravel-socialite-oidc

OpenID Connect OAuth2 Provider for Laravel Socialite

2073.7k](/packages/kovah-laravel-socialite-oidc)

PHPackages © 2026

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