PHPackages                             dweik/laravel-guard-jwt-validator - 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. dweik/laravel-guard-jwt-validator

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

dweik/laravel-guard-jwt-validator
=================================

Laravel guard for validate JWT token

1.0.2(3y ago)0378MITPHPPHP &gt;=7.4

Since Nov 16Pushed 3y ago1 watchersCompare

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

READMEChangelogDependencies (1)Versions (4)Used By (0)

Laravel Guard JWT Validator
---------------------------

[](#laravel-guard-jwt-validator)

This package used for microservices to validate the JWT access token and create user if is not exists. It built on Laravel Guard model, so developer could use the auth config and helper to setup the packager programmer.

### Install

[](#install)

Require this package with composer using the following command:

```
composer require dweik/laravel-guard-jwt-validator
```

Then you need publish the config files by execute the following command

```
php artisan vendor:publish --tag=laravel-guard-jwt-config
```

Then you have set up the JWT configuration values in `config/jwt.php`, and add the follow values in `config/auth.php` to add new guard to laravel project

```
    'guards' => [
        .
        .
        // add under guards value
        'jwt' => [
            'driver' => 'jwt',
            'provider' => 'guard-jwt',
        ],
    ]

    'providers' => [
        .
        .
        // add under providers value
        'guard-jwt' => [
             'driver' => 'guard-jwt',
             'model' => \App\Models\User::class
        ],
    ]

```

---

### How to use

[](#how-to-use)

you can add guard to middleware or use it as default guard by changing the `defaults` value in `config/auth.php`

### Changelog

[](#changelog)

V1.0.1

- \[bugfix\] return an exception `Token not valid` if token not passed

V1.0.0

- Validate the JWT token
- Create user if is not exists by using the JWT payload values

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity49

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

Total

3

Last Release

1299d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15715732?v=4)[Abdelqader Osama Aldweik](/maintainers/asd4abyd)[@asd4abyd](https://github.com/asd4abyd)

---

Top Contributors

[![asd4abyd](https://avatars.githubusercontent.com/u/15715732?v=4)](https://github.com/asd4abyd "asd4abyd (5 commits)")

---

Tags

jwtmiddlewarelaravelvalidatorrsaguardMicroservice

### Embed Badge

![Health badge](/badges/dweik-laravel-guard-jwt-validator/health.svg)

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

PHPackages © 2026

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