PHP code example of notwes / laravel-uls

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

    

notwes / laravel-uls example snippets


return [
    /*
    |--------------------------------------------------------------------------
    | Laravel ULS
    |--------------------------------------------------------------------------
    */

    /*
     * ULS Version to use
     *
     * By default we'll use 2
     */
    'version' => env('ULS_VERSION', 2),

    /*
     * Set the JSON Web Key retrieved from VATUSA's Facility Management
     */
    'jwk' => json_decode(env('ULS_JWK', []), true),

    /*
     * Facility 3 letter identifier
     */
    'facility' => env('ULS_FACILITY', 'ZZZ')
];

$app->configure('uls');

    $uls->redirectUrl()
    

    $uls->redirectUrl(true)
    

    $uls = new Uls();
    if ($uls->verifyToken($token)) {
       // Token was true
    }
    

    $uls->getInfo();