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::client(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::setHTMLHeader('
00026 <html>
00027 <head>
00028 <title>__TITLE__</title>
00029 </head>
00030 <body>
00031 <h1>__TITLE__</h1>
00032 ');
00033 phpCAS::setHTMLFooter('
00034 <hr>
00035 <address>
00036 phpCAS __PHPCAS_VERSION__,
00037 CAS __CAS_VERSION__ (__SERVER_BASE_URL__)
00038 </address>
00039 </body>
00040 </html>
00041 ');
00042
00043
00044
00045 phpCAS::forceAuthentication();
00046
00047
00048
00049
00050
00051 ?>
00052 <html>
00053 <head>
00054 <title>phpCAS simple client with HTML output customization</title>
00055 </head>
00056 <body>
00057 <h1>Successfull Authentication!</h1>
00058 <?php include 'script_info.php' ?>
00059 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
00060 <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
00061 </body>
00062 </html>