PHPackages                             berg/ldap-authenticator - 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. berg/ldap-authenticator

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

berg/ldap-authenticator
=======================

A package for quickly setting up LDAP authentication

0.2.4(10y ago)11281MITPHPPHP &gt;=5.4.0

Since May 6Pushed 10y ago1 watchersCompare

[ Source](https://github.com/mrberggg/ldap-authenticator)[ Packagist](https://packagist.org/packages/berg/ldap-authenticator)[ Docs](https://github.com/mrberggg/ldap-authenticator)[ RSS](/packages/berg-ldap-authenticator/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (7)Versions (9)Used By (0)

[![Build Status](https://camo.githubusercontent.com/fbfbd8cef622159c938e0c91b1cd847488568640eb9236d42435f715b069468b/68747470733a2f2f7472617669732d63692e6f72672f6d726265726767672f6c6461702d61757468656e74696361746f722e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/mrberggg/ldap-authenticator)

LDAP Authenticator
==================

[](#ldap-authenticator)

This package adds quick support for LDAP authentication using Zend Frameowork's LDAP authentication package. It includes support for Laravel 5.

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

[](#installation)

`composer require berg/ldap-authenticator`

Laravel Config
--------------

[](#laravel-config)

This package comes with a driver to support quick setup using Laravel 5. To set up, first install the package and then register the driver by placing the following code in the AppServiceProvider's boot method:

```
Auth::extend('ldap', function($app) {
    $userProvider = new LdapUserProvider();
    return new Guard($userProvider, $app->make('Illuminate\Session\Store'));
});

```

Then create a file named ldap.php in the config/ folder. The file should return an array with the following values:

```
'hostname'      => '',
'port'          => 636,
'security'      => 'SSL',
'base_dn'       => '',
'bind_dn'       => '',
'bind_password' => ''

```

Lastly set the driver in the `config/auth.php` file to `ldap`.

If you wish to use the class for non-authentication tasks such as checking if a user exists, you may also use the built in service provider by adding the following line to the `app.php` config file:

```
'Berg\LdapAuthenticator\Laravel\LdapServiceProvider'

```

Usage
-----

[](#usage)

Once set up, using the Auth::attempt($username, $password) will automatically call on the ldap driver.

To use the service provider, call `App::make('LdapAuthenticateService')`

### Exceptions

[](#exceptions)

This package uses exceptions to handle invalid logins. The following errors are used:

```
'Berg\LdapAuthenticator\Exceptions\IncorrectCredentialsException'
'Berg\LdapAuthenticator\Exceptions\InvalidCredentialsException'
'Berg\LdapAuthenticator\Exceptions\UserDoesNotExistException

```

If using Laravel, these should be added to the `$dontReport` property in the Handler class. [Custom handling of each exception can be added to the `Handler->render()` method.](http://laravel.com/docs/5.0/errors#handling-errors)

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community5

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

8

Last Release

3876d ago

PHP version history (2 changes)0.1PHP &gt;=5.5.0

0.1.1PHP &gt;=5.4.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/c27b8862c4219474522de47d039dab93624e161107c47a7b4c74aa1c227a1448?d=identicon)[mrberggg](/maintainers/mrberggg)

---

Tags

phplaravelldap

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/berg-ldap-authenticator/health.svg)

```
[![Health](https://phpackages.com/badges/berg-ldap-authenticator/health.svg)](https://phpackages.com/packages/berg-ldap-authenticator)
```

###  Alternatives

[oriceon/oauth-5-laravel

OAuth Service Provider for Laravel 5

1851.5M](/packages/oriceon-oauth-5-laravel)[shanmuga/laravel-entrust

This package provides a flexible solution to add ACL to Laravel

68312.9k2](/packages/shanmuga-laravel-entrust)[tomatophp/filament-users

Manage your users with a highly customizable user resource for FilamentPHP with integration of filament-shield and filament-impersonate

90102.0k7](/packages/tomatophp-filament-users)[pallant/laravel-aws-cognito-auth

An authentication driver for Laravel for authenticating users in AWS Cognito User Pools

777.7k](/packages/pallant-laravel-aws-cognito-auth)[tomatophp/filament-developer-gate

Secure your selected route by using a middleware with static password for developers only

11106.7k6](/packages/tomatophp-filament-developer-gate)

PHPackages © 2026

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