PHP code example of ums-lspl / sso-client

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

    

ums-lspl / sso-client example snippets


protected $fillable = [
    // ...
    'smartexam_id',
];

// config/smartexam-sso.php
'user_provisioner' => App\Services\YourSsoUserProvisioner::class,

use SmartExam\SsoClient\Events\SmartExamSsoAuthenticated;

Event::listen(SmartExamSsoAuthenticated::class, function ($event) {
    // $event->user, $event->payload
});

use SmartExam\SsoClient\Support\SsoUrl;

SsoUrl::overlayScript();  // SmartExam /js/sso-overlay.js URL
SsoUrl::connect($state);  // Full-page SSO connect URL
SsoUrl::issuerSignIn();   // SmartExam sign-in page
bash
composer vendor:publish --tag=smartexam-sso-config
php artisan vendor:publish --tag=smartexam-sso-migrations
php artisan migrate
bash
php artisan vendor:publish --tag=smartexam-sso-views