PHP code example of clemsonmartech / laravel-shibboleth

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

    

clemsonmartech / laravel-shibboleth example snippets


Jhu\Wse\LaravelShibboleth\ShibalikeServiceProvider::class,

'providers' => [
    'users' => [
        'driver' => 'shibboleth',
        'model'  => App\Models\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
}