24 define (
'APACHE_AUTH_TYPE_DIRECT_MAPPING', 1);
25 define (
'APACHE_AUTH_TYPE_EXTENDED_MAPPING', 2);
26 define (
'APACHE_AUTH_TYPE_BY_FUNCTION', 3);
55 public function __construct($a_container,$a_addition_options = array())
62 $this->apache_settings =
new ilSetting(
'apache_auth');
69 $_POST[
'password'] =
'yyy';
72 $_POST[
'cmd[butSubmit]'] =
'Submit';
74 if (
$_POST[
'username'] !=
'anonymous') {
76 switch($this->apache_settings->get(
'apache_auth_username_config_type'))
79 $_POST[
'username'] = $_SERVER[$this->apache_settings->get(
'apache_auth_username_direct_mapping_fieldname')];
82 throw new ilException(
"APACHE_AUTH_TYPE_EXTENDED_MAPPING not yet implemented");
84 include_once
'Services/AuthApache/classes/custom_username_func.php';
93 $_POST[
'username'] =
'§invalid';
94 $_POST[
'password'] =
'anonymous';
103 $skipClasses = array(
'ilpasswordassistancegui',
'ilaccountregistrationgui');
104 $skipFiles = array(
'pwassist.php');
105 if(in_array(strtolower(
$_REQUEST[
'cmdClass']), $skipClasses))
111 $script = pathinfo($_SERVER[
'PHP_SELF'], PATHINFO_BASENAME);
112 if(in_array(strtolower($script), $skipFiles))
116 !$this->apache_settings->get(
'apache_auth_authenticate_on_login_page') &&
118 preg_match(
'/.*login\.php$/', $_SERVER[
'SCRIPT_NAME']) ||
119 ((in_array(
$_REQUEST[
'cmd'], array(
'showLogin',
'showUserAgreement')) || isset(
$_POST[
'change_lang_to'])) && strtolower(
$_REQUEST[
'cmdClass']) ==
'ilstartupgui')
126 if(!$this->apache_settings->get(
'apache_auth_authenticate_on_login_page') && preg_match(
'/.*login\.php$/', $_SERVER[
'SCRIPT_NAME']))
136 $path = $_SERVER[
'REQUEST_URI'];
138 if (
$path{0} ==
'/') {
142 if (substr(
$path, 0, 4) !=
'http') {
143 $parts = parse_url(ILIAS_HTTP_PATH);
144 $path = $parts[
'scheme'] .
'://' . $parts[
'host'] .
'/' .
$path;