00001 <?php
00002
00003
00004
00005
00006
00007
00008 include_once('CAS/CAS.php');
00009
00010
00011 phpCAS::client(CAS_VERSION_2_0,'sso-cas.univ-rennes1.fr',443,'');
00012
00013
00014 phpCAS::setHTMLHeader('
00015 <html>
00016 <head>
00017 <title>__TITLE__</title>
00018 </head>
00019 <body>
00020 <h1>__TITLE__</h1>
00021 ');
00022 phpCAS::setHTMLFooter('
00023 <hr>
00024 <address>
00025 phpCAS __PHPCAS_VERSION__,
00026 CAS __CAS_VERSION__ (__SERVER_BASE_URL__)
00027 </address>
00028 </body>
00029 </html>
00030 ');
00031
00032
00033
00034 phpCAS::forceAuthentication();
00035
00036
00037
00038
00039
00040 ?>
00041 <html>
00042 <head>
00043 <title>phpCAS simple client with HTML output customization</title>
00044 </head>
00045 <body>
00046 <h1>Successfull Authentication!</h1>
00047 <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
00048 <p>phpCAS version is <b><?php echo phpCAS::getVersion(); ?></b>.</p>
00049 </body>
00050 </html>