PHP code example of unicesil / shibboleth-bundle

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

    

unicesil / shibboleth-bundle example snippets




return [
    //...
    UniceSIL\ShibbolethBundle\UniceSILShibbolethBundle::class => ['all' => true]
];


class User extends UserInterface
{
    //...

    public function getUserIdentifier() {
        // ...
    }
    
}


use UniceSIL\ShibbolethBundle\Security\Provider\AbstractShibbolethUserProvider;

class MyShibbolethUserProvider extends AbstractShibbolethUserProvider
{
    public function loadUserByIdentifier(string $identifier): UserInterface
    {
        $shibbolethUserAttributes = $this->getAttributes();
        
        // Return an instance of User
    }
}