PHP code example of chez14 / cas-min-min-php
1. Go to this page and download the library: Download chez14/cas-min-min-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/ */
chez14 / cas-min-min-php example snippets
use Chez14\CASMinMin;
// buat service
$service = new CASMinMin\Services\StudentPortal();
// buat identity
$identity = new CASMinMin\Identity\NPM('2016730011', 'passwordmu123');
// buat CAS Loginer, lalu lakukan login
$cas = new CASMinMin\CASMinMin($service, $identity);
$cas->login();
// ambil clientnya, dan lakukan fetch sendiri
$service_client = $service->get_client();