PHPackages                             robrogers3/laraldap-auth - 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. robrogers3/laraldap-auth

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

robrogers3/laraldap-auth
========================

ldap authentication for laravel

1.1.1(8y ago)2281MITPHPPHP &gt;=5.4CI failing

Since Apr 17Pushed 6y ago1 watchersCompare

[ Source](https://github.com/robrogers3/laraldap-auth)[ Packagist](https://packagist.org/packages/robrogers3/laraldap-auth)[ Docs](https://github.com/robrogers3/laraldap-auth)[ RSS](/packages/robrogers3-laraldap-auth/feed)WikiDiscussions master Synced today

READMEChangelogDependencies (3)Versions (5)Used By (0)

laraldap-auth: Authenticate against your Ldap Server
====================================================

[](#laraldap-auth-authenticate-against-your-ldap-server)

[![Latest Version on Packagist](https://camo.githubusercontent.com/9dd5a70c65b27e7bbc0383afcb035f0903b3da08153fcca8743033bd29396699/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f726f62726f67657273332f6c6172616c6461702d617574682e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/robrogers3/laraldap-auth)[![Software License](https://camo.githubusercontent.com/55c0218c8f8009f06ad4ddae837ddd05301481fcf0dff8e0ed9dadda8780713e/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d627269676874677265656e2e7376673f7374796c653d666c61742d737175617265)](LICENSE.md)

Drop in replacement for Laravel authentication against your ldap service.

Supporting OpenLDAP.

Install
-------

[](#install)

Via Composer

```
$ composer require robrogers3/laraldap-auth
```

Usage
-----

[](#usage)

Add this to app.php in the services providers list

```
robrogers3\laradauth\LdapAuthServiceProvider::class,
```

Update config/auth.php

```
    'providers' => [
        'users' => [
           'driver' => 'ldap',
           'model' => App\User::class,
           'host' => 'host.example..com',
           'domain' => 'example.com',
           'base_dn' => 'cn=users,dc=cs-ds1-1,dc=home,dc=example,dc=com',
           'user_dn' => 'uid'
        ],
    ],
```

Create your database, and specify database connection options in .env and/or config/database.php

Use Artisan to make auth and migrate

Run:

```
php artisan make:auth
```

If you are using Bootstrap 3 then you can publish the views to prevent user registration.

```
php artisan migrate
```

```
php artisan vendor:publish --force #force cause we override those in make auth.
```

You may be done. Go ahead and login.

Using AES to encrypt passwords
------------------------------

[](#using-aes-to-encrypt-passwords)

The LDAP passwords are saved in the User table. Normally they are encrypted wih BCrypt.

There is now AES support so you can safely exchange information from other applications that require an ldap login for authentication.

With AES and a shared key, you can encrypt and decrypt passwords on either side if you share the same AES key.

Here's the changes you need to make:

1. Add the packages HashServiceProvider to config/app.php

```
        /*
         * Package Service Providers...
         */
        robrogers3\laradauth\LdapAuthServiceProvider::class,
        robrogers3\laradauth\HashServiceProvider::class,
```

Update the config/hashing.php file like so.

```
    'driver' => 'aes',

    //more config here

    'aes' => [
        'key' => 'shared-secret-key'
    ]
```

Update your user database migration and add this column:

```
            $table->string('user_name');
```

Then update your services.php config file, like so:

```
    'ldap' => [
        'create-user-name' => true
    ]
```

Now you should be good to go.

Change log
----------

[](#change-log)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Testing
-------

[](#testing)

```
$ composer test me not
```

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) and [CONDUCT](CONDUCT.md) for details.

Security
--------

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [Rob Rogers](https://github.com/robrogers3)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

Established project with proven stability

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

Total

4

Last Release

2957d ago

PHP version history (2 changes)1.0.0PHP ~5.6|~7.0

1.1.1PHP &gt;=5.4

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2775002?v=4)[Rob Rogers](/maintainers/robrogers3)[@robrogers3](https://github.com/robrogers3)

---

Top Contributors

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

---

Tags

laravellaravel-authenticationldapldap-authenticationlaravelAuthenticationldaprobrogers3laraldap-auth

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/robrogers3-laraldap-auth/health.svg)

```
[![Health](https://phpackages.com/badges/robrogers3-laraldap-auth/health.svg)](https://phpackages.com/packages/robrogers3-laraldap-auth)
```

###  Alternatives

[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.2M17](/packages/directorytree-ldaprecord-laravel)[hasinhayder/tyro

Tyro - The ultimate Authentication, Authorization, and Role &amp; Privilege Management solution for Laravel 12 &amp; 13

6783.6k5](/packages/hasinhayder-tyro)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2013.2k](/packages/alajusticia-laravel-logins)

PHPackages © 2026

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