1. Go to this page and download the library: Download bows/ssoclient 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/ */
bows / ssoclient example snippets
use SsoClient\Client;
# for register new app
Client::registerApp('YOUR_APPNAME', 'YOUR_APPKEY');
# for authenticate token
$credentials = [
'token' => '',
'appid' => 'YOUR_APPID',
'appsecret' => 'YOUR_APPSECRET'
];
Client::authenticateSso($credentials);
# for redirect to sso login page
# origin https://<your-website>/<method for save session>
$credentials = [
'appid' => 'YOUR_APPID',
'appsecret' => 'YOUR_APPSECRET',
'origin' => 'https://your-website.com/loginhelper',
];
Client::redirectToSso($credentials);