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

Jacek Kowalski
2015-09-05 9da16f4812a443331d93348b2b0e7a88924b6724
1
2
3
4
5
6
7
8
9
10
11
12
<?php
require_once('uphpCAS.php');
session_start();
 
$cas = new uphpCAS($_SESSION['cas']);
 
if($cas->isAuthenticated()) {
    $user = $cas->authenticate();
    echo 'Authenticated as '.$user->user;
} else {
    echo 'Not authenticated. <a href="login.php">Log in</a>';
}