00001 <?php 00002 00003 // 00004 // phpCAS client that handles central logout requests from the CAs server 00005 // 00006 00007 // import phpCAS lib 00008 include_once('CAS.php'); 00009 00010 phpCAS::setDebug(); 00011 00012 // initialize phpCAS 00013 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,''); 00014 00015 // no SSL validation for the CAS server 00016 phpCAS::setNoCasServerValidation(); 00017 00018 // handle incoming logout requests 00019 phpCAS::handleLogoutRequests(); 00020 00021 // force CAS authentication 00022 phpCAS::forceAuthentication(); 00023 00024 // for this test, simply print that the authentication was successfull 00025 ?> 00026 <html> 00027 <head> 00028 <title>phpCAS simple client</title> 00029 </head> 00030 <body> 00031 <h1>Successfull Authentication!</h1> 00032 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p> 00033 <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p> 00034 </body> 00035 </html>