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 4w 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 41% 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

3714d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/611575?v=4)[Northwestern University Student Affairs IT](/maintainers/nusait)[@nusait](https://github.com/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

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.1M337](/packages/psalm-plugin-laravel)[laravel/ai

The official AI SDK for Laravel.

1.0k2.1M163](/packages/laravel-ai)[illuminate/auth

The Illuminate Auth package.

9327.9M1.2k](/packages/illuminate-auth)[moonshine/moonshine

Laravel administration panel

1.3k239.9k76](/packages/moonshine-moonshine)[tallstackui/tallstackui

TallStackUI is a powerful suite of Blade components that elevate your workflow of Livewire applications.

721160.4k12](/packages/tallstackui-tallstackui)[masterix21/laravel-licensing

Laravel licensing package with polymorphic assignment to any model, activation keys, expirations/renewals, and seat control via LicenseUsage. Supports offline verification with public-key–signed tokens, a CLI to generate/rotate/revoke keys, and an extensible architecture via config and contracts.

1542.1k4](/packages/masterix21-laravel-licensing)

PHPackages © 2026

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