mirror of https://github.com/jacekkow/uphpCAS-tests

Jacek Kowalski
2015-09-05 5686c9d8de959de0818bcd0a5b18a9c004d3dfc5
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
<?php
require_once('uphpCAS.php');
session_start();
 
try {
    $cas = new uphpCAS($_SESSION['cas']);
    if(isset($_SESSION['cafile'])) {
        $cas->setCaFile($_SESSION['cafile']);
    }
    $user = $cas->authenticate();
    
    header('Location: index.php');
} catch(Exception $e) {
    echo 'Jasig authentication failed: '.$e->getMessage();
    die();
}