PHPackages                             mnshankar/laravel-shib-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. mnshankar/laravel-shib-auth

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

mnshankar/laravel-shib-auth
===========================

Convert Shibboleth tokens to equivalent Laravel User Table columns so Laravel auth semantics can be used

v1.0(9y ago)030MITPHPPHP &gt;=5.4.0

Since May 27Pushed 9y ago1 watchersCompare

[ Source](https://github.com/mnshankar/laravel-shib-auth)[ Packagist](https://packagist.org/packages/mnshankar/laravel-shib-auth)[ RSS](/packages/mnshankar-laravel-shib-auth/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (2)Used By (0)

Shibboleth-Laravel authentication bridge
========================================

[](#shibboleth-laravel-authentication-bridge)

Shibboleth authentication typically results in the identity provider setting a bunch of server variables after successful authentication. This is a Laravel 5.0+/PHP 5.4+ package helps with converting those server tokens into Laravel User Table fields so that regular Laravel semantics of authentication can be followed.

**Note that shib auth must already have occured - usually using directives in the .htaccess file.**

The included middleware checks the user table and

1. If a matching user is NOT found, it creates a new user row
2. If a user is found in the users table, the corresponding user record is retrieved
3. The user is then logged in to the application using Auth::login($user)

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

[](#installation)

require the package via composer

```
$ composer require mnshankar/laravel-shib-auth
```

Next, setup the service provider. This allows you to modify the config file (the default tokens are specific to UF implementation of Shibboleth)

In your config/app providers array, add:

```
'mnshankar\Shib\ShibAuthServiceProvider',
```

You must insure that

1. The mapped fields exist in your users table.
2. Shibboleth sets valid values for all tokens specified (else exception is thrown)
3. "password" field in the users table must be nullable as we will not be using it.

Usage
-----

[](#usage)

Edit your http kernel.php file to include the shib middleware from the package like so:

```
'shib'=>'mnshankar\Shib\Middleware\ShibAuth',
```

Now, you can use the middleware either from the controller or from your route.

1. In your controller:

    ```
    function __construct()
    {
        $this->middleware('shib');
    }
    ```
2. In your route:

    Using Laravel 5.0

    ```
    Route::get('my/page', ['middleware' => 'shib', function()
    {
        //
    }]);
    ```

    Using Laravel 5.1+

    You can continue using Laravel 5.0 style.. or use chaining:

    ```
    Route::get('/', function () {
        //
    })->middleware(['shib']);
    ```

    You may also use route groups. Please look up Laravel documentation on Middleware to learn more

Configuration Options
---------------------

[](#configuration-options)

You can customize the configuration options by publishing them

```
php artisan vendor:publish --provider="mnshankar\Shib\ShibAuthServiceProvider"
```

###  Health Score

26

—

LowBetter than 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity58

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

Unknown

Total

1

Last Release

3322d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/mnshankar-laravel-shib-auth/health.svg)

```
[![Health](https://phpackages.com/badges/mnshankar-laravel-shib-auth/health.svg)](https://phpackages.com/packages/mnshankar-laravel-shib-auth)
```

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M2.9k](/packages/craftcms-cms)[illuminate/auth

The Illuminate Auth package.

10528.2M1.2k](/packages/illuminate-auth)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.2M17](/packages/directorytree-ldaprecord-laravel)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M337](/packages/psalm-plugin-laravel)[hasinhayder/tyro

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

6783.6k5](/packages/hasinhayder-tyro)[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)
