PHPackages                             nusait/nuldap-laravel - 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. nusait/nuldap-laravel

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

nusait/nuldap-laravel
=====================

0.2.5(10y ago)02681[2 issues](https://github.com/nusait/nuldap-laravel/issues)[1 PRs](https://github.com/nusait/nuldap-laravel/pulls)PHPPHP &gt;=5.3.0

Since Feb 27Pushed 9y ago6 watchersCompare

[ Source](https://github.com/nusait/nuldap-laravel)[ Packagist](https://packagist.org/packages/nusait/nuldap-laravel)[ RSS](/packages/nusait-nuldap-laravel/feed)WikiDiscussions master Synced 2mo ago

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

NuLdap
======

[](#nuldap)

This is a LDAP package meant for Northwestern University. (But can be extended for other entities)

Installation via Composer
-------------------------

[](#installation-via-composer)

```
composer require nusait/nuldap-laravel

```

Then update composer

```
composer update

```

Laravel
-------

[](#laravel)

Add the service provider to `config/app.php`

```
Nusait\Nuldap\NuldapServiceProvider::class,
```

Publish the config:

```
php artisan vendor:publish --provider="Nusait\Nuldap\NuldapServiceProvider"

```

To use the fake Ldap, make sure to add to your `.env` file the line:

```
ldap_fake=true

```

When using NuldapFake, any search will return a user with pre-filled data using Faker. Whatever search term you provide for a field will return as the value for that field, i.e. a `searchNetid('asdf')` will return a user with `['netid'] = 'asdf'`. In order to simulate not finding a user, prepend the query with `nf-`, i.e. `searchNetid('nf-blah')` and it will not find that user.

New Instance:
-------------

[](#new-instance)

`$ldap = \App::make('ldap')` or `$ldap = app('ldap')`

Validate:
---------

[](#validate)

```
$ldap->validate($netid, $password);
```

returns a boolean

Searching:
----------

[](#searching)

You can search by netid, email, emplid, or studentid.

```
$ldap->search('netid', $netid);
$ldap->search('email', $email);
$ldap->search('emplid', $emplid);
$ldap->search('studentid', $studentid);
```

This returns the raw ldap metadata.

You can also search using the magic methods:

```
$ldap->searchNetid($netid);
$ldap->searchEmail($email);
$ldap->searchEmplid($emplid);
$ldap->searchStudentid($studentid);
```

Parsing User
------------

[](#parsing-user)

```
$ldap->parseUser($ldapUser [, $transformer ]);
```

You can parse the raw metadata of a user to create an associative array of the user. You can pass your own transformer into the function. The transformer must implement the TransformerInterface in the Contracts folder.

The default transforms maps the following keys and value:

```
return [
    'netid'       => $this->getSetValueOrNull($ldapUser, 'uid'),
    'phone'       => $this->getSetValueOrNull($ldapUser, 'telephonenumber'),
    'email'       => $this->getSetValueOrNull($ldapUser, 'mail'),
    'title'       => $this->getSetValueOrNull($ldapUser, 'title'),
    'first_name'  => $this->getSetValueOrNull($ldapUser, 'givenname'),
    'last_name'   => $this->getSetValueOrNull($ldapUser, 'sn'),
    'displayname' => $this->getSetValueOrNull($ldapUser, 'displayname'),
    'emplid'      => (int)$this->getSetValueOrNull($ldapUser, 'employeenumber'),
    'studentid'   => (int)$this->getSetValueOrNull($ldapUser, 'nustudentnumber')
];
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

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

Total

7

Last Release

3665d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/519539ad4a194df792ca370f9272589dc03d93518ea98178411fd3309206aea9?d=identicon)[nusait](/maintainers/nusait)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nusait-nuldap-laravel/health.svg)

```
[![Health](https://phpackages.com/badges/nusait-nuldap-laravel/health.svg)](https://phpackages.com/packages/nusait-nuldap-laravel)
```

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[bezhansalleh/filament-shield

Filament support for `spatie/laravel-permission`.

2.8k2.9M88](/packages/bezhansalleh-filament-shield)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[illuminate/auth

The Illuminate Auth package.

9327.3M1.0k](/packages/illuminate-auth)[andrewdwallo/filament-companies

A comprehensive Laravel authentication and authorization system designed for Filament, focusing on multi-tenant company management.

34450.0k2](/packages/andrewdwallo-filament-companies)[alajusticia/laravel-logins

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

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

PHPackages © 2026

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