• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • Examples
  • File List
  • File Members

docs/examples/example_lang.php

Go to the documentation of this file.
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&eacute;ussie&nbsp;!</h1>
00036     <p>L'utilisateur connect&eacute; 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>

Generated on Tue Aug 3 2010 08:38:39 for phpCAS by  doxygen 1.7.1