• Main Page
  • Related Pages
  • Modules
  • Classes
  • Files
  • Examples
  • File List
  • File Members

docs/examples/config.php

Go to the documentation of this file.
00001 <?php
00002 
00003 // The purpose of this central config file is configuring all examples
00004 // in one place with minimal work for your working environment
00005 
00006 $phpcas_path = '../../source/';
00007 
00009 // Basic Config of the phpCAS client //
00011 
00012 // Full Hostname of your CAS Server
00013 $cas_host = '192.168.178.254';
00014 
00015 // Context of the CAS Server
00016 $cas_context = '/cas';
00017 
00018 // Port of your CAS server. Normally for a https server it's 443
00019 $cas_port = 8443;
00020 
00021 // Path to the ca chain that issued the cas server certificate
00022 $cas_server_ca_cert_path = '/usr/local/share/ca-certificates/3some-cacert.crt';
00023 
00025 // Advanced Config for special purposes //
00027 
00028 // The "real" hosts of clustered cas server that send SAML logout messages
00029 // Assumes the cas server is load balanced across multiple hosts
00030 $cas_real_hosts = array (
00031         '192.168.178.254'
00032 );
00033 
00034 // Database config for PGT Storage
00035 //$db = 'pgsql:host=localhost;dbname=phpcas';
00036 $db = 'mysql:host=localhost;dbname=phpcas';
00037 //$db_user = 'phpcas';
00038 //$db_password = '1938r132rwv12cadl';
00039 $db_user = 'root';
00040 $db_password = 'test1234';
00041 $db_table = 'phpcas';
00042 
00044 // End Configuration -- Don't edit below //
00046 
00047 // Generating the URLS for the local cas example services for proxy testing
00048 if ( isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on'){
00049         $curbase = 'https://'.$_SERVER['SERVER_NAME'];
00050 }else{
00051         $curbase = 'http://'.$_SERVER['SERVER_NAME'];
00052 }
00053 if ($_SERVER['SERVER_PORT'] != 80 && $_SERVER['SERVER_PORT'] != 443)
00054         $curbase .= ':'.$_SERVER['SERVER_PORT'];
00055 
00056 $curdir = dirname($_SERVER['REQUEST_URI'])."/";
00057 
00058 // access to a single service
00059 $serviceUrl = $curbase.$curdir.'example_service.php';
00060 // access to a second service
00061 $serviceUrl2 = $curbase.$curdir.'example_service_that_proxies.php';
00062 
00063 $cas_url = 'https://'.$cas_host;
00064 if ($cas_port != '443')
00065 {
00066         $cas_url = $cas_url.':'.$cas_port;
00067 }
00068 $cas_url = $cas_url.$cas_context;
00069 
00070 
00071 // Set the session-name to be unique to the current script so that the client script
00072 // doesn't share its session with a proxied script.
00073 // This is just useful when running the example code, but not normally.
00074 session_name('session_for:'.preg_replace('/[^a-z0-9-]/i', '_', basename($_SERVER['SCRIPT_NAME'])));
00075 ?>

Generated on Sun Jun 5 2011 19:05:26 for phpCAS by  doxygen 1.7.1