phpCAS  version 1.4.0
config.php
Go to the documentation of this file.
1 <?php
2 
20 $phpcas_path = '../../source/';
21 
23 // Basic Config of the phpCAS client //
25 
26 // Full Hostname of your CAS Server
27 $cas_host = 'cas.fritschi.me';
28 
29 // Context of the CAS Server
30 $cas_context = '/cas';
31 
32 // Port of your CAS server. Normally for a https server it's 443
33 $cas_port = 8443;
34 
35 // Path to the ca chain that issued the cas server certificate
36 $cas_server_ca_cert_path = '/etc/tomcat8/conf/cacert.pem';
37 
39 // Advanced Config for special purposes //
41 
42 // The "real" hosts of clustered cas server that send SAML logout messages
43 // Assumes the cas server is load balanced across multiple hosts
44 $cas_real_hosts = array('cas-real-1.example.com', 'cas-real-2.example.com');
45 
46 // Client config for cookie hardening
47 $client_domain = 'cas.fritschi.me';
48 $client_path = 'phpcas';
52 
53 // Database config for PGT Storage
54 $db = 'pgsql:host=localhost;dbname=phpcas';
55 //$db = 'mysql:host=localhost;dbname=phpcas';
56 $db_user = 'phpcasuser';
57 $db_password = 'mysupersecretpass';
58 $db_table = 'phpcastabel';
60 
62 // End Configuration -- Don't edit below //
64 
65 // Generating the URLS for the local cas example services for proxy testing
66 if (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') {
67  $curbase = 'https://' . $_SERVER['SERVER_NAME'];
68 } else {
69  $curbase = 'http://' . $_SERVER['SERVER_NAME'];
70 }
71 if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443) {
72  $curbase .= ':' . $_SERVER['SERVER_PORT'];
73 }
74 
75 $curdir = dirname($_SERVER['REQUEST_URI']) . "/";
76 
77 // CAS client nodes for rebroadcasting pgtIou/pgtId and logoutRequest
78 $rebroadcast_node_1 = 'http://cas-client-1.example.com';
79 $rebroadcast_node_2 = 'http://cas-client-2.example.com';
80 
81 // access to a single service
82 $serviceUrl = $curbase . $curdir . 'example_service.php';
83 // access to a second service
84 $serviceUrl2 = $curbase . $curdir . 'example_service_that_proxies.php';
85 
86 $pgtBase = preg_quote(preg_replace('/^http:/', 'https:', $curbase . $curdir), '/');
87 $pgtUrlRegexp = '/^' . $pgtBase . '.*$/';
88 
89 $cas_url = 'https://' . $cas_host;
90 if ($cas_port != '443') {
91  $cas_url = $cas_url . ':' . $cas_port;
92 }
94 
95 // Set the session-name to be unique to the current script so that the client script
96 // doesn't share its session with a proxied script.
97 // This is just useful when running the example code, but not normally.
98 session_name(
99  'session_for-'
100  . preg_replace('/[^a-z0-9-]/i', '_', basename($_SERVER['SCRIPT_NAME']))
101 );
102 // Set an UTF-8 encoding header for internation characters (User attributes)
103 header('Content-Type: text/html; charset=utf-8');
104 ?>
$client_httpOnly
Definition: config.php:50
$serviceUrl
Definition: config.php:82
$cas_url
Definition: config.php:89
$db
Definition: config.php:54
$client_path
Definition: config.php:48
$serviceUrl2
Definition: config.php:84
$cas_real_hosts
Definition: config.php:44
$client_domain
Definition: config.php:47
$rebroadcast_node_1
Definition: config.php:78
$pgtUrlRegexp
Definition: config.php:87
$db_table
Definition: config.php:58
$pgtBase
Definition: config.php:86
$cas_host
Definition: config.php:27
$rebroadcast_node_2
Definition: config.php:79
$db_user
Definition: config.php:56
$phpcas_path
Definition: config.php:20
$db_password
Definition: config.php:57
if($_SERVER['SERVER_PORT'] !=80 && $_SERVER['SERVER_PORT'] !=443) $curdir
Definition: config.php:75
$cas_server_ca_cert_path
Definition: config.php:36
$cas_port
Definition: config.php:33
$client_secure
Definition: config.php:49
$client_lifetime
Definition: config.php:51
$cas_context
Definition: config.php:30
$driver_options
Definition: config.php:59