PHPackages                             ohffs/simple-laravel-ldap - 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. ohffs/simple-laravel-ldap

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

ohffs/simple-laravel-ldap
=========================

Basic LDAP auser auth/lookup

2.0.3(4mo ago)04.7k1MITPHPCI failing

Since Jan 19Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/ohnotnow/simple-ldap)[ Packagist](https://packagist.org/packages/ohffs/simple-laravel-ldap)[ RSS](/packages/ohffs-simple-laravel-ldap/feed)WikiDiscussions master Synced today

READMEChangelog (5)Dependencies (2)Versions (20)Used By (1)

*WIP*

Simple LDAP package for Laravel
===============================

[](#simple-ldap-package-for-laravel)

This is a very, very simple and very specific LDAP package. It's really just a wrapper of code I usually copy from project to project to do LDAP lookups of our local LDAP server, so it's usefulness outside of that is probably quite limited. But it might be useful as a basis for your own setup.

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

[](#installation)

```
composer require ohffs/simple-laravel-ldap

```

I'm assuming this is for Laravel 5.5+ so it should auto-discover the service providers. You can then publish the config file :

```
php artisan vendor:publish

```

And pick the 'Ohffs\\Ldap\\LdapServiceProvider' option which will create a `config/ldap.php` file. This just looks for two env variables which you should set - LDAP\_SERVER and LDAP\_OU eg,

```
LDAP_SERVER=ldap.your-domain.com
LDAP_OU=Staff

```

Usage
-----

[](#usage)

You can use the facade to access the main methods :

```
if (\Ldap::authenticate('username', 'password')) {
  // whatever
}

$user = \Ldap::findUser('jenny123');
dump($user);
/*
Ohffs\Ldap\LdapUser {#739
  #username: "jenny123"
  #email: "Jenny@example.com"
  #surname: "Smith"
  #forenames: "Jenny"
  #phone: "012345678"
}
*/
print $user['email'];
// 'Jenny@example.com'
print $user->email;
// 'Jenny@example.com'
print $user->toArray();
/*
[
     "username" => "jenny123",
     "email" => "Jenny@example.com",
     "surname" => "Smith",
     "forenames" => "Jenny",
     "phone" => "012345678",
]
*/

```

Or if you want to use the container/DI just typehint on 'Ohffs\\Ldap\\LdapService':

```
use Ohffs\Ldap\LdapService;

public function __construct(LdapService $ldap)
{
    $this->ldap = $ldap;
}

public function something()
{
   if ($this->ldap->authenticate('username', 'password')) {
       // ...
   }
}

```

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance77

Regular maintenance activity

Popularity20

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor1

Top contributor holds 97.9% 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 ~185 days

Recently: every ~579 days

Total

17

Last Release

123d ago

Major Versions

1.3.4 → 2.02022-06-10

### Community

Maintainers

![](https://www.gravatar.com/avatar/5472be37b2cbedfa6c905bb674cb5780378cf2adcfc47befe01ad7bb4d14f734?d=identicon)[ohnotnow](/maintainers/ohnotnow)

---

Top Contributors

[![ohnotnow](https://avatars.githubusercontent.com/u/6471843?v=4)](https://github.com/ohnotnow "ohnotnow (47 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")

---

Tags

laravelldap-authenticationphp

### Embed Badge

![Health badge](/badges/ohffs-simple-laravel-ldap/health.svg)

```
[![Health](https://phpackages.com/badges/ohffs-simple-laravel-ldap/health.svg)](https://phpackages.com/packages/ohffs-simple-laravel-ldap)
```

###  Alternatives

[vitalybaev/laravel5-dkim

Laravel 5/6 package for signing outgoing messages with DKIM.

3163.1k](/packages/vitalybaev-laravel5-dkim)

PHPackages © 2026

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