00001 <?php 00002 00003 // 00004 // phpCAS proxied client (service) 00005 // 00006 00007 // import phpCAS lib 00008 include_once('CAS.php'); 00009 00010 // set debug mode 00011 phpCAS::setDebug(); 00012 00013 // initialize phpCAS 00014 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,''); 00015 00016 // no SSL validation for the CAS server 00017 phpCAS::setNoCasServerValidation(); 00018 00019 // force CAS authentication 00020 phpCAS::forceAuthentication(); 00021 00022 // at this step, the user has been authenticated by the CAS server 00023 // and the user's login name can be read with phpCAS::getUser(). 00024 00025 // for this test, simply print that the authentication was successfull 00026 echo '<p>The user\'s login is <b>'.phpCAS::getUser().'</b>.</p>'; 00027 00028 ?>