PHPackages                             uicosss/laravel-shibboleth - 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. uicosss/laravel-shibboleth

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

uicosss/laravel-shibboleth
==========================

Enable basic Shibboleth support for Laravel 5.x. Forked from razorbacks/laravel-shibboleth.

v11.0.4(1y ago)032MITPHP

Since Mar 13Pushed 1y ago1 watchersCompare

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

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

Laravel Shibboleth Service Provider
===================================

[](#laravel-shibboleth-service-provider)

Forked from [razorbacks/laravel-shibboleth](https://github.com/razorbacks/ubuntu-authentication/tree/master/shibboleth) for use at The University of Illinois at Chicago. This package provides Shibboleth authentication for Laravel at UIC.

[![Code Coverage](https://camo.githubusercontent.com/99696b0bf25909537e32ae39cacebf95db63c1ad118b13dcea139c1b0b147845/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f72617a6f726261636b732f6c61726176656c2d73686962626f6c6574682f6d61737465722e737667)](https://codecov.io/gh/razorbacks/laravel-shibboleth/branch/master)

Pre-Requisites
--------------

[](#pre-requisites)

In order to use this plugin, we assume you already have a pre-existing Shibboleth SP and Shibboleth IdP configured. This does not (and will not) go into explaining how to set that up.

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

[](#installation)

Use [composer](https://getcomposer.org/) to require the latest release into your project:

```
composer require dpazuic/laravel-shibboleth

```

If you're running Laravel &gt;= 5.5, then you can skip this step, otherwise you will need to manually register the service provider in your `config/app.php`file within the `Providers` array.

```
StudentSystemServices\Shibboleth\ShibbolethServiceProvider::class,
```

If you you would like to use the emulated IdP via shibalike, then you will need to manually register it on any version - this is not automatically loaded even in Laravel 5.5.

```
StudentSystemServices\Shibboleth\ShibalikeServiceProvider::class,
```

Publish the default configuration file:

```
php artisan vendor:publish --provider="StudentSystemServices\Shibboleth\ShibbolethServiceProvider"

```

Change the driver to `shibboleth` in your `config/auth.php` file.

```
'providers' => [
    'users' => [
        'driver' => 'shibboleth',
        'model'  => App\User::class,
    ],
],
```

Now users may login via Shibboleth by going to `https://example.uic.edu/shibboleth-login`and logout using `https://example.uic.edu/shibboleth-logout` so you can provide a custom link or redirect based on email address in the login form.

```
@if (Auth::guest())
    Login
@else

        Logout {{ Auth::user()->name }}

@endif
```

You may configure server variable mappings in `config/shibboleth.php` such as the user's first name, last name, entitlements, etc. You can take a look at them by reading what's been populated into the `$_SERVER` variable after authentication.

```
