example_lang.php

00001 <?php
00002 
00003 //
00004 // phpCAS simple client configured with another language
00005 //
00006 
00007 // import phpCAS lib
00008 include_once('CAS/CAS.php');
00009 
00010 // initialize phpCAS
00011 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,'');
00012 
00013 // set the language to french
00014 phpCAS::setLang(PHPCAS_LANG_FRENCH);
00015 
00016 // force CAS authentication
00017 phpCAS::forceAuthentication();
00018 
00019 // at this step, the user has been authenticated by the CAS server
00020 // and the user's login name can be read with phpCAS::getUser().
00021 
00022 // moreover, a PGT was retrieved from the CAS server that will
00023 // permit to gain accesses to new services.
00024 
00025 // for this test, simply print that the authentication was successfull
00026 ?>
00027 <html>
00028   <head>
00029     <title>Exemple d'internationalisation de phpCAS</title>
00030   </head>
00031   <body>
00032     <h1>Authentification r&eacute;ussie&nbsp;!</h1>
00033     <p>L'utilisateur connect&eacute; est <b><?php echo phpCAS::getUser(); ?></b>.</p>
00034     <p>La version de phpCAS est <b><?php echo phpCAS::getVersion(); ?></b>.</p>
00035   </body>
00036 </html>

Generated on Wed Mar 14 14:55:56 2007 for phpCAS by  doxygen 1.5.0