24 define (
'APACHE_AUTH_TYPE_DIRECT_MAPPING', 1);
25 define (
'APACHE_AUTH_TYPE_EXTENDED_MAPPING', 2);
26 define (
'APACHE_AUTH_TYPE_BY_FUNCTION', 3);
59 parent::__construct($storageDriver,
$options,
'',
false);
60 $this->setSessionName(
"_authhttp".md5(CLIENT_ID));
62 $this->apache_settings =
new ilSetting(
'apache_auth');
64 if (
defined(
'IL_CERT_SSO') && IL_CERT_SSO) {
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';
92 if (
defined(
'IL_CERT_SSO') && IL_CERT_SSO && !
$_POST[
'username']) {
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',
'showTermsOfService')) || 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']))
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;
151 return parent::login();
Base class for ILIAS Exception handling.
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
const APACHE_AUTH_TYPE_DIRECT_MAPPING
const APACHE_AUTH_TYPE_BY_FUNCTION
const APACHE_AUTH_TYPE_EXTENDED_MAPPING
__construct($storageDriver, $options='', $loginFunction='', $showLogin=true)
Contructor.
if(!is_array($argv)) $options
const IL_COOKIE_PATH(isset($_GET["client_id"]))
Apache based authentication
supportsRedirects()
Returns true, if the current auth mode allows redirection to e.g to loginScreen, public section...
static getHtmlPath($relative_path)
get url of path
Create styles array
The data for the language used.
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
static redirect($a_script)
http redirect to other script
static supportsRedirects()
Are redirects supported?