PHPackages                             nusait/nu-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. nusait/nu-auth

ActiveLibrary

nusait/nu-auth
==============

3.1.2(10y ago)0300PHPPHP &gt;=5.3.0

Since Aug 19Pushed 10y ago6 watchersCompare

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

READMEChangelog (5)Dependencies (4)Versions (15)Used By (0)

NuAuth Package
==============

[](#nuauth-package)

This is a package created for Authentication at NUSAIT. (Other people can use it, but it is pretty specific for our own use)

Install
-------

[](#install)

1. run `composer require nusait/nu-auth`
2. add in `app` configuration file's service providers: `Nusait\NuAuth\NuAuthServiceProvider::class`
3. you can run `php artisan vendor:publish`. You should see two files being copied to your config directory: `nuauth.php` and `ldap.php`. Take a look at `ldap.php` to see what you need to put in your .env file.
4. change `auth` configuration's driver to "nuauth"

To Use
------

[](#to-use)

1. just run "Auth::attempt" like normal. :D Happy Time

Advanced
--------

[](#advanced)

Sometimes you want to have a more flexible way of creating your user. Maybe you want to include the user's emplid when you save it to the database. You can set the "userCreator" config property as a callback as such

```
[...

'userCreator' => function ($user, $metadata, $ldap) {
    // $user is the laravel model.
    // $metadata is the raw metadata from ldap.
    // $ldap is the \Nusait\NuLdap\Ldap object.
    $user->first_name = $metadata['given_name'][0];
    $user->last_name = $metadata['sn'][0];
    $user->emplid = $metadata['uid'][0];
    $user->save();

    //remember to return the $user
    return $user;
};

]
```

###  Health Score

30

—

LowBetter than 64% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 76.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 ~37 days

Recently: every ~8 days

Total

14

Last Release

3809d ago

Major Versions

1.2.1 → 2.0.02015-03-27

2.1.0 → 3.0.02015-11-09

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/nusait-nu-auth/health.svg)

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

###  Alternatives

[tymon/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

11.5k49.1M350](/packages/tymon-jwt-auth)[laravel/passport

Laravel Passport provides OAuth2 server support to Laravel.

3.4k85.0M532](/packages/laravel-passport)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[php-open-source-saver/jwt-auth

JSON Web Token Authentication for Laravel and Lumen

8359.8M53](/packages/php-open-source-saver-jwt-auth)[laravel-doctrine/orm

An integration library for Laravel and Doctrine ORM

8425.3M87](/packages/laravel-doctrine-orm)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9682.1M97](/packages/roots-acorn)

PHPackages © 2026

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