PHP code example of uabookstores / laravel-shibboleth

1. Go to this page and download the library: Download uabookstores/laravel-shibboleth library. Choose the download type require.

2. Extract the ZIP file and open the index.php.

3. Add this code to the index.php.
    
        
<?php
require_once('vendor/autoload.php');

/* Start to develop here. Best regards https://php-download.com/ */

    

uabookstores / laravel-shibboleth example snippets


StudentAffairsUwm\Shibboleth\ShibbolethServiceProvider::class,

StudentAffairsUwm\Shibboleth\ShibalikeServiceProvider::class,

> 'idp_logout' => '/Shibboleth.sso/Logout?return=https%3A%2F%2Fshibboleth.arizona.edu%2Fcgi-bin%2Flogout.pl',
> 

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

@if (Auth::guest())
    <a href="/shibboleth-login">Login</a>
@else
    <a href="/shibboleth-logout">
        Logout {{ Auth::user()->name }}
    </a>
@endif

 print_r($_SERVER);

$entitlement = 'urn:mace:uark.edu:ADGroups:Computing Services:Something';

if (Entitlement::has($entitlement)) {
    // authorize something
}