summaryrefslogblamecommitdiffstats
path: root/config.php.example
blob: 77141538b53420d97044ad12174471eeb4dadf09 (plain) (tree)
1
2
3
4
5
6
7




                                                                     

                                                               









                                                                                                                                                      




                                                                                        
 

                               
                                                   






                                                                                        
 







                                                                                                     
                           







                                                                                                 
            
<?php

// This might leak sensitive information. Never enable in production!
define('CONFIG_DEBUG', true);
define('CONFIG_PREFIX', '/webif/');
define('CONFIG_SESSION_TIMEOUT', 86400 * 7);
define('CONFIG_FORCE_DOMAIN', 'my.server.address.example.com');
define('CONFIG_ENTITLEMENT', ';http://bwidm.de/entitlement/bwLehrpool;');
define('CONFIG_SUITE', 'bwLehrpool');
define('CONFIG_HELPURL', 'www.bwlehrpool.de');
define('CONFIG_FOOTER_SUPPORT', '//www.hs-offenburg.de/rz/projekte/bwlehrpool-servicedesk/');
define('CONFIG_MASTERWEBIF', 'https://bwlp-masterserver.ruf.uni-freiburg.de/webif/');
define('CONFIG_IDM', 'bwIDM');
define('CONFIG_PROVIDER', 'Universität Freiburg');

define('CONFIG_ADMINS', serialize(array('5fb22037697816a70a847d15245c9f88', '94e48d34587ab9963a2013ddc97e1e45', 'fb91f270a95a5b006be916f2b2da305c')));

define('CONFIG_IDM_LINK_SN', 'https://www.bwidm.de/attribute.php#Nachname');
define('CONFIG_IDM_LINK_GIVENNAME', 'https://www.bwidm.de/attribute.php#Vorname');
define('CONFIG_IDM_LINK_MAIL', 'https://www.bwidm.de/attribute.php#E-Mail-Adresse');
define('CONFIG_IDM_LINK_PID', 'https://www.bwidm.de/attribute.php#Persistant%20ID');
define('CONFIG_IDM_LINK_EPSA', 'https://www.bwidm.de/attribute.php#Zugeh%C3%B6rigkeit');

define('CONFIG_SURNAME', 'sn');
define('CONFIG_EPPN', 'eppn');
define('CONFIG_SCOPED_AFFILIATION', 'affiliation');
// If enabled, when a new user registers, check if there is an existing user with
// same organizationid, email, first and last name. If so, allow user to merge account
// with existing one. This should be safe if you trust all the IdPs in your federation,
// which should be assumed to be true anyways for a million other reasons.
// If this is false, only offer merge if the existing account is a "test account", local
// to the masterserver.
define('CONFIG_ALLOW_SHIB_MERGE', true);

// Have a properties file or set variables here manually.
// Make sure properties file is not in webroot
$lines = @file('/some/where/config/mysql.properties', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$key = array();
foreach ($lines as $line) {
	if (preg_match('/^\s*(.+?)\s*=\s*(\S*)\s*$/', $line, $out))
		$key[$out[1]] = $out[2];
}
unset($lines, $line, $out);
if (empty($key['host']) || empty($key['db']) || empty($key['user']) || empty($key['password'])) {
	die('Missing database config');
}

define('CONFIG_SQL_DSN', "mysql:dbname={$key['db']};host={$key['host']}");
define('CONFIG_SQL_USER', $key['user']);
define('CONFIG_SQL_PASS', $key['password']);
define('CONFIG_SQL_FORCE_UTF8', true);
unset($key);