PHP code example of razorbacks / laravel-shibboleth

1. Go to this page and download the library: Download razorbacks/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/ */

    

razorbacks / laravel-shibboleth example snippets


StudentAffairsUwm\Shibboleth\ShibbolethServiceProvider::class,

StudentAffairsUwm\Shibboleth\ShibalikeServiceProvider::class,

> 'idp_logout' => '/Shibboleth.sso/Logout?return=https%3A%2F%2Fidp.uark.edu%2Fidp%2Fexit.jsp',
> 

'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);

Route::name('login')->get('/login', '\\'.Route::getRoutes()->getByName('shibboleth-login')->getActionName());

Route::redirect('/login', '/shibboleth-login')->name('login');

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

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