PHP code example of novay / sso-php

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

    

novay / sso-php example snippets




erti = [
    'url' => 'https://sso.samarindakota.go.id', 
    'name' => 'XXX', 
    'secret' => 'XXX'
];

$broker = new \Novay\SsoPhp\Services\Broker($properti);
echo $broker->getLogin();


 

rti = [
    'url' => 'https://sso.samarindakota.go.id', 
    'name' => 'XXX', 
    'secret' => 'XXX'
];

$broker = new \Novay\SsoPhp\Services\Broker($properti);
$user = $broker->getUser($_GET['code'], $_GET['uid'], $_GET['pwd']);

echo $user['id'];
echo $user['photo'];
echo $user['name'];
echo $user['email'];
echo $user['phone'];
echo $user['address'];
echo $user['gender'];
echo $user['date_birth'];
echo $user['number_id'];
echo $user['type_id'];
echo $user['level'];

// Silahkan lakukan penyimpanan session atau pembagian hak akses mandiri kedalam aplikasi client
// ...



erti = [
    'url' => 'https://sso.samarindakota.go.id', 
    'name' => 'XXX', 
    'secret' => 'XXX'
];

$broker = new \Novay\SsoPhp\Services\Broker($properti);
echo $broker->logout();

bash
composer