Go to the documentation of this file.00001 <?php
00002
00003
00004
00005 include_once('config.php');
00006
00007 include_once($phpcas_path.'/CAS.php');
00008
00009
00010 phpCAS::setDebug();
00011
00012
00013 phpCAS::proxy(CAS_VERSION_2_0, $cas_host, $cas_port, $cas_context);
00014
00015
00016
00017
00018
00019
00020
00021
00022 phpCAS::setNoCasServerValidation();
00023
00024
00025 phpCAS::forceAuthentication();
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035 ?>
00036 <html>
00037 <head>
00038 <title>phpCAS proxied proxy service example</title>
00039 <link rel="stylesheet" type='text/css' href='example.css'/>
00040 </head>
00041 <body>
00042 <h1>I am a service that can be proxied. In turn, I proxy another service.</h1>
00043 <?php include 'script_info.php' ?>
00044 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
00045 <h2>Response from service <?php echo $serviceUrl; ?></h2>
00046 <?php
00047 flush();
00048 // call a service and change the color depending on the result
00049 if ( phpCAS::serviceWeb($serviceUrl,$err_code,$output) ) {
00050 echo '<div class="success">';
00051 } else {
00052 echo '<div class="error">';
00053 }
00054 echo $output;
00055 echo '</div>';
00056 ?>
00057 </body>
00058 </html>
00059