PHPackages                             p4bgroup/ldap-jwt-authentication - 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. p4bgroup/ldap-jwt-authentication

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

p4bgroup/ldap-jwt-authentication
================================

JWT Authentication using LDAP connections

v1.1.1(4y ago)13132MITPHPPHP &gt;=7.2.0

Since Apr 6Pushed 4y ago2 watchersCompare

[ Source](https://github.com/P4BGroup/ldap-jwt-authentication)[ Packagist](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication)[ RSS](/packages/p4bgroup-ldap-jwt-authentication/feed)WikiDiscussions master Synced 2d ago

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

P4BGroup Authentication
-----------------------

[](#p4bgroup-authentication)

JWT Authentication service using LDAP connections for Phalcon Projects

[![Latest Stable Version](https://camo.githubusercontent.com/d1470e81b6e731df6300854d675ce617a4e17130a5e294c6537c3564eeb64625/68747470733a2f2f706f7365722e707567782e6f72672f70346267726f75702f6c6461702d6a77742d61757468656e7469636174696f6e2f762f737461626c65)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication) [![License](https://camo.githubusercontent.com/77bc40e12fa083e2b7d49edb8ef437560239a3df7aac360668059ba82e52142d/68747470733a2f2f706f7365722e707567782e6f72672f70346267726f75702f6c6461702d6a77742d61757468656e7469636174696f6e2f6c6963656e7365)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication) [![Maintainability](https://camo.githubusercontent.com/72e360dee177c2802daf4483e0c7441851756a506357e9367e226ddaca64a4ec/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36396432303765393061356130333832623661372f6d61696e7461696e6162696c697479)](https://codeclimate.com/github/P4BGroup/ldap-jwt-authentication/maintainability) [![Total Downloads](https://camo.githubusercontent.com/df08b75630bb478cacf5979e9ea95acf9bec59f0dd220bfff4cd59478b48803b/68747470733a2f2f706f7365722e707567782e6f72672f70346267726f75702f6c6461702d6a77742d61757468656e7469636174696f6e2f646f776e6c6f616473)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication) [![Test Coverage](https://camo.githubusercontent.com/1f393b5f2ce3e251b193f9aa183c86ddddce044c0d6df19cd41e6f6ae4532c1e/68747470733a2f2f6170692e636f6465636c696d6174652e636f6d2f76312f6261646765732f36396432303765393061356130333832623661372f746573745f636f766572616765)](https://codeclimate.com/github/P4BGroup/ldap-jwt-authentication/test_coverage) [![Build Status](https://camo.githubusercontent.com/b26640054f1696b0c98f6b25cf740aee8aef142d0bbcecb0aaa8c58ce866319c/68747470733a2f2f7472617669732d63692e636f6d2f50344247726f75702f6c6461702d6a77742d61757468656e7469636174696f6e2e7376673f6272616e63683d6d6173746572)](https://travis-ci.com/P4BGroup/ldap-jwt-authentication) [![composer.lock](https://camo.githubusercontent.com/ee06842aaf6614b5ffaaeb1e4ad720d5011ea126d0d4346043e946c9fb430296/68747470733a2f2f706f7365722e707567782e6f72672f70346267726f75702f6c6461702d6a77742d61757468656e7469636174696f6e2f636f6d706f7365726c6f636b)](https://packagist.org/packages/p4bgroup/ldap-jwt-authentication)

Usage
-----

[](#usage)

```
$ldap = new Laminas\Ldap\Ldap([..]);
$authService = new AuthenticationService($ldap);
$jwtTokensService = new JWTTokensService($algorithm, $encodeKey, $decodeKey);

/** @param P4BGroup\Authentication\User $user */
$user = $authService->authenticateUser($username, $password, $userBaseDn);

$claims = new P4BGroup\Authentication\Claims();
$claims->setData($user->toArray())
->setSubject(Claims::SUBJECT_REFRESH)
->setExpirationTime(new DateTime("+10 minutes"))

$accessToken = $jwtTokensService->encode($claims);
$refreshToken = $jwtTokensService->encode($claims->setSubject(Claims::SUBJECT_REFRESH)->setExpirationTime(new DateTime("+1 hour"));
```

###  Health Score

29

—

LowBetter than 60% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity58

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.6% 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 ~272 days

Total

5

Last Release

1505d ago

PHP version history (2 changes)v1.0.0PHP ~7.2

v1.1.0PHP &gt;=7.2.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/13b6b73a69c16b06d2fc6296529526423796dc1098acc0155edd54f17a54e909?d=identicon)[cfv1000](/maintainers/cfv1000)

---

Top Contributors

[![tbl0605](https://avatars.githubusercontent.com/u/3315731?v=4)](https://github.com/tbl0605 "tbl0605 (16 commits)")[![sancy](https://avatars.githubusercontent.com/u/5879074?v=4)](https://github.com/sancy "sancy (7 commits)")

---

Tags

jwtjwt-authenticationldapldap-authentication

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/p4bgroup-ldap-jwt-authentication/health.svg)

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

###  Alternatives

[google/auth

Google Auth Library for PHP

1.4k272.7M162](/packages/google-auth)[thenetworg/oauth2-azure

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

2509.6M48](/packages/thenetworg-oauth2-azure)[stevenmaguire/oauth2-keycloak

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

2275.9M27](/packages/stevenmaguire-oauth2-keycloak)[robsontenorio/laravel-keycloak-guard

🔑 Simple Keycloak Guard for Laravel

5161.1M3](/packages/robsontenorio-laravel-keycloak-guard)[patrickbussmann/oauth2-apple

Sign in with Apple OAuth 2.0 Client Provider for The PHP League OAuth2-Client

1132.5M6](/packages/patrickbussmann-oauth2-apple)[wp-graphql/wp-graphql-jwt-authentication

JWT Authentication for WPGraphQL

361118.4k1](/packages/wp-graphql-wp-graphql-jwt-authentication)

PHPackages © 2026

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