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

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

mrfabulous/laravel-shibboleth
=============================

Enable basic Shibboleth support for Laravel 5.x

02PHP

Since Jan 31Pushed 1y agoCompare

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

READMEChangelogDependenciesVersions (2)Used By (0)

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

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

This package provides Shibboleth authentication for Laravel.

For development, it can *emulate* an IdP (via [mrclay/shibalike](https://github.com/mrclay/shibalike)).

[![Build Status](https://camo.githubusercontent.com/966eb07d63abec63851ffc40574903664b7d3e1a67717adf72ba0d4a7bd5fb24/68747470733a2f2f7472617669732d63692e6f72672f72617a6f726261636b732f6c61726176656c2d73686962626f6c6574682e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/razorbacks/laravel-shibboleth) [![Code Climate](https://camo.githubusercontent.com/661501222db5e9b3c1d12082e99569e9213b502927afdc3c33a5bd67f8c62f0a/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f72617a6f726261636b732f6c61726176656c2d73686962626f6c6574682f6261646765732f6770612e737667)](https://codeclimate.com/github/razorbacks/laravel-shibboleth) [![Code Coverage](https://camo.githubusercontent.com/99696b0bf25909537e32ae39cacebf95db63c1ad118b13dcea139c1b0b147845/68747470733a2f2f696d672e736869656c64732e696f2f636f6465636f762f632f6769746875622f72617a6f726261636b732f6c61726176656c2d73686962626f6c6574682f6d61737465722e737667)](https://codecov.io/gh/razorbacks/laravel-shibboleth/branch/master)

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

[](#installation)

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

```
composer require uabookstores/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.

```
StudentAffairsUwm\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.

```
StudentAffairsUwm\Shibboleth\ShibalikeServiceProvider::class,
```

*Note* that the password is the same as the username for shibalike.

Publish the default configuration file:

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

```

Optionally, you can also publish the views for the shibalike emulated IdP login:

```
php artisan vendor:publish --provider="StudentAffairsUwm\Shibboleth\ShibalikeServiceProvider"

```

> University of Arizona Users:
>
> To also logout with the IdP, set the the following in `config/shibboleth.php`
>
> ```
> 'idp_logout' => '/Shibboleth.sso/Logout?return=https%3A%2F%2Fshibboleth.arizona.edu%2Fcgi-bin%2Flogout.pl',
> ```

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.com/shibboleth-login` and logout using `https://example.com/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.

```
