00001 <?php
00002
00003
00004
00005
00006
00007
00008 include_once('CAS/CAS.php');
00009
00010 phpCAS::setDebug();
00011
00012
00013 phpCAS::proxy(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,'');
00014
00015
00016 phpCAS::setPGTStorageFile('xml',session_save_path());
00017
00018
00019 phpCAS::forceAuthentication();
00020
00021
00022
00023
00024
00025
00026
00027 $service = 'https:
00028
00029 ?>
00030 <html>
00031 <head>
00032 <title>phpCAS proxy example with PGT storage to file</title>
00033 </head>
00034 <body>
00035 <h1>phpCAS proxy example with PGT storage to file</h1>
00036 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
00037 <h2>Response from service <?php echo $service; ?></h2><ul><hr>
00038 <?php
00039 flush();
00040
00041 if ( phpCAS::serviceWeb($service,$err_code,$output) ) {
00042 echo '<font color="#00FF00">';
00043 } else {
00044 echo '<font color="#FF0000">';
00045 }
00046 echo $output;
00047 echo '</font><hr></ul>';
00048 ?>
00049 </body>
00050 </html>