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

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

phramework/jwt
==============

JWT authentication wrapper for phramework, using firebase/php-jwt

1.0.2(8y ago)216.5k2[1 PRs](https://github.com/phramework/jwt/pulls)Apache-2.0PHPPHP &gt;=7

Since Nov 28Pushed 8y ago4 watchersCompare

[ Source](https://github.com/phramework/jwt)[ Packagist](https://packagist.org/packages/phramework/jwt)[ Docs](https://phramework.github.io/)[ RSS](/packages/phramework-jwt/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (2)Dependencies (5)Versions (7)Used By (0)

jwt
===

[](#jwt)

JWT authorization wrapper for phramework, using firebase/php-jwt

[![Build Status](https://camo.githubusercontent.com/41b6974116e2a42f36ba2df5c7f675610afab0a6e0f0ef2ef8a7cfe008cfe00e/68747470733a2f2f7472617669732d63692e6f72672f706872616d65776f726b2f6a77742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/phramework/jwt)

Usage
-----

[](#usage)

Require package

```
composer require phramework/jwt

```

```
//Set authentication class
\Phramework\Authentication\Manager::register(
    \Phramework\Authentication\JWT\JWT::class
);

//Set method to fetch user object, including password attribute
\Phramework\Authentication\Manager::setUserGetByEmailMethod(
    [\MyApp\API\Models\User::class, 'getByEmailWithPassword']
);

\Phramework\Authentication\Manager::setAttributes(
    ['user_type', 'email']
);
```

Install dependencies
--------------------

[](#install-dependencies)

```
composer update
```

Test and lint code
------------------

[](#test-and-lint-code)

```
composer lint
composer test
```

License
=======

[](#license)

Copyright 2015 Xenofon Spafaridis

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

```
http://www.apache.org/licenses/LICENSE-2.0

```

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

###  Health Score

34

—

LowBetter than 75% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity67

Established project with proven stability

 Bus Factor1

Top contributor holds 97.1% 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 ~186 days

Total

5

Last Release

3115d ago

Major Versions

0.0.1 → 1.0.02017-01-31

PHP version history (2 changes)0.0.0PHP &gt;=5.6

1.0.0PHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/432379?v=4)[Xenofon Spafaridis](/maintainers/nohponex)[@nohponex](https://github.com/nohponex)

---

Top Contributors

[![nohponex](https://avatars.githubusercontent.com/u/432379?v=4)](https://github.com/nohponex "nohponex (34 commits)")[![alkallio](https://avatars.githubusercontent.com/u/1079045?v=4)](https://github.com/alkallio "alkallio (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

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

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

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k286.7M204](/packages/google-auth)[stevenmaguire/oauth2-keycloak

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

2276.2M36](/packages/stevenmaguire-oauth2-keycloak)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

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

AWS Cognito package that allows Auth and other related features using the AWS SDK for PHP

121242.9k1](/packages/ellaisys-aws-cognito)[microsoft/kiota-authentication-phpleague

Authentication provider for Kiota using the PHP League OAuth 2.0 client to authenticate against the Microsoft Identity platform

153.8M9](/packages/microsoft-kiota-authentication-phpleague)[rainlab/user-plugin

User plugin for October CMS

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

PHPackages © 2026

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