phpCAS  version 1.4.0
example_proxy_rebroadcast.php
Go to the documentation of this file.
1 <?php
2 
18 // Load the settings from the central config file
19 require_once 'config.php';
20 // Load the CAS lib
21 require_once $phpcas_path . '/CAS.php';
22 
23 // Enable debugging
25 // Enable verbose error messages. Disable in production!
26 phpCAS::setVerbose(true);
27 
28 // Initialize phpCAS
30 
31 // For production use set the CA certificate that is the issuer of the cert
32 // on the CAS server and uncomment the line below
33 // phpCAS::setCasServerCACert($cas_server_ca_cert_path);
34 
35 // For quick testing you can disable SSL validation of the CAS server.
36 // THIS SETTING IS NOT RECOMMENDED FOR PRODUCTION.
37 // VALIDATING THE CAS SERVER IS CRUCIAL TO THE SECURITY OF THE CAS PROTOCOL!
39 
40 // Set the nodes for rebroadcasting pgtIou/pgtId and logoutRequest
43 
44 // handle incoming logout requests
46 
47 // force CAS authentication
49 
50 // at this step, the user has been authenticated by the CAS server
51 // and the user's login name can be read with phpCAS::getUser().
52 
53 ?>
54 <html>
55  <head>
56  <title>phpCAS proxy rebroadcast example</title>
57  <link rel="stylesheet" type='text/css' href='example.css'/>
58  </head>
59  <body>
60  <h1>phpCAS proxy rebroadcast example</h1>
61  <p>the user's login is <b><?php echo phpCAS::getUser(); ?></b>.</p>
62  </body>
63 </html>
static forceAuthentication()
Definition: CAS.php:1146
Definition: CAS.php:281
static handleLogoutRequests($check_client=true, $allowed_clients=array())
Definition: CAS.php:1324
static addRebroadcastNode($rebroadcastNodeUrl)
Definition: CAS.php:1837
static proxy($server_version, $server_hostname, $server_port, $server_uri, $changeSessionID=true, \SessionHandlerInterface $sessionHandler=null)
Definition: CAS.php:391
$phpcas_path
$rebroadcast_node_2
static setLogger($logger=null)
Definition: CAS.php:448
const CAS_VERSION_2_0
Definition: CAS.php:78
static setVerbose($verbose)
Definition: CAS.php:512
$cas_host
$cas_context
$cas_port
static setNoCasServerValidation()
Definition: CAS.php:1689
$rebroadcast_node_1