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

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

chrisbraybrooke/jwt
===================

A package by Christian Braybrooke

v0.0.6(2y ago)03561MITPHP

Since Aug 12Pushed 2y ago1 watchersCompare

[ Source](https://github.com/ChrisBraybrooke/Laravel-JWT-Package)[ Packagist](https://packagist.org/packages/chrisbraybrooke/jwt)[ RSS](/packages/chrisbraybrooke-jwt/feed)WikiDiscussions main Synced 3w ago

READMEChangelog (6)Dependencies (3)Versions (7)Used By (0)

Laravel Resource Server JWT Auth
================================

[](#laravel-resource-server-jwt-auth)

For use with an authentication server using Laravel Passport. This package will read the incoming JWT and authenticate the user.

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

[](#installation)

```
composer require chrisbraybrooke/jwt

```

Setup
-----

[](#setup)

1. Add the `ChrisBraybrooke\JWT\Traits\AuthenticatesWithAuthServer` trait to your `User` model, this contains a few methods that help create new users.
2. In your `.env` file add an `OAUTH_AUTH_SERVER_API_ENDPOINT` entry, this is the base api url on your authentication server, and will be used to pull the users information in when creating a new user. You also need a `OAUTH_PUBLIC_KEY` entry, this is your public key that is being used on the authentication server and will allow us to validate incoming JWTs.
3. Finally, you will need to change the api guard driver in your `config/auth.php` file - see below.

```
'api' => [
    'driver' => 'jwt', // --> We have created a driver called jwt, make sure your driver is set to this.
    'provider' => 'users',
    'hash' => false,
]

```

Config
------

[](#config)

You can publish the config file be running `php artisan vendor:publish --tag=jwt-config`

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity46

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

Recently: every ~249 days

Total

6

Last Release

787d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/954f04d21211c33ec6dd750169be63b054d65d2fba406a0ad523b43cda015b25?d=identicon)[ChrisBraybrooke](/maintainers/ChrisBraybrooke)

---

Top Contributors

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

### Embed Badge

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

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

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k294.2M217](/packages/google-auth)[thenetworg/oauth2-azure

Azure Active Directory OAuth 2.0 Client Provider for The PHP League OAuth2-Client

25310.7M82](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

Keycloak OAuth 2.0 Client Provider for The PHP League OAuth2-Client

2306.4M44](/packages/stevenmaguire-oauth2-keycloak)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5181.2M3](/packages/robsontenorio-laravel-keycloak-guard)[ellaisys/aws-cognito

Laravel Authentication using AWS Cognito (Web and API)

123256.9k1](/packages/ellaisys-aws-cognito)[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)
