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