00001 <?php 00002 00003 // 00004 // phpCAS simple client configured with another language 00005 // 00006 00007 // import phpCAS lib 00008 include_once('CAS.php'); 00009 00010 // initialize phpCAS 00011 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,''); 00012 00013 // no SSL validation for the CAS server 00014 phpCAS::setNoCasServerValidation(); 00015 00016 // set the language to french 00017 phpCAS::setLang(PHPCAS_LANG_FRENCH); 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 // moreover, a PGT was retrieved from the CAS server that will 00026 // permit to gain accesses to new services. 00027 00028 // for this test, simply print that the authentication was successfull 00029 ?> 00030 <html> 00031 <head> 00032 <title>Exemple d'internationalisation de phpCAS</title> 00033 </head> 00034 <body> 00035 <h1>Authentification réussie !</h1> 00036 <p>L'utilisateur connecté est <b><?php echo phpCAS::getUser(); ?></b>.</p> 00037 <p>La version de phpCAS est <b><?php echo phpCAS::getVersion(); ?></b>.</p> 00038 </body> 00039 </html>