00001 <?php
00002
00003
00004
00005
00006
00007
00008 include_once('CAS/CAS.php');
00009
00010 phpCAS::setDebug();
00011
00012
00013 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,'');
00014
00015
00016 phpCAS::forceAuthentication();
00017
00018
00019
00020
00021
00022 if (isset($_REQUEST['logout'])) {
00023 phpCAS::logout();
00024 }
00025
00026
00027 ?>
00028 <html>
00029 <head>
00030 <title>phpCAS simple client</title>
00031 </head>
00032 <body>
00033 <h1>Successfull Authentication!</h1>
00034 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
00035 <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
00036 <p><a href="?logout=">Logout</a></p>
00037 </body>
00038 </html>