24define(
'APACHE_AUTH_TYPE_DIRECT_MAPPING', 1);
 
   25define(
'APACHE_AUTH_TYPE_EXTENDED_MAPPING', 2);
 
   26define(
'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') {
 
   75                switch ($this->apache_settings->get(
'apache_auth_username_config_type')) {
 
   77                                                $_POST[
'username'] = 
$_SERVER[$this->apache_settings->get(
'apache_auth_username_direct_mapping_fieldname')];
 
   80                                                throw new ilException(
"APACHE_AUTH_TYPE_EXTENDED_MAPPING not yet implemented");
 
   82                                                include_once 
'Services/AuthApache/classes/custom_username_func.php';
 
   89        if (
defined(
'IL_CERT_SSO') && IL_CERT_SSO && !
$_POST[
'username']) {
 
   90            $_POST[
'username'] = 
'§invalid';
 
   91            $_POST[
'password'] = 
'anonymous';
 
  101        $skipClasses = array(
'ilpasswordassistancegui', 
'ilaccountregistrationgui');
 
  102        $skipFiles   = array(
'pwassist.php');
 
  103        if (in_array(strtolower($_REQUEST[
'cmdClass']), $skipClasses)) {
 
  106            $script = pathinfo(
$_SERVER[
'PHP_SELF'], PATHINFO_BASENAME);
 
  107            if (in_array(strtolower($script), $skipFiles)) {
 
  112            !$this->apache_settings->get(
'apache_auth_authenticate_on_login_page') &&
 
  114                preg_match(
'/.*login\.php$/', 
$_SERVER[
'SCRIPT_NAME']) ||
 
  115                ((in_array($_REQUEST[
'cmd'], array(
'showLogin', 
'showTermsOfService')) || isset(
$_POST[
'change_lang_to'])) && strtolower($_REQUEST[
'cmdClass']) == 
'ilstartupgui')
 
  121        if (!$this->apache_settings->get(
'apache_auth_authenticate_on_login_page') && preg_match(
'/.*login\.php$/', 
$_SERVER[
'SCRIPT_NAME'])) {
 
  132            if (
$path{0} == 
'/') {
 
  136            if (substr(
$path, 0, 4) != 
'http') {
 
  137                $parts = parse_url(ILIAS_HTTP_PATH);
 
  138                $path = $parts[
'scheme'] . 
'://' . $parts[
'host'] . 
'/' . 
$path;
 
  144            return parent::login();
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
const APACHE_AUTH_TYPE_EXTENDED_MAPPING
const APACHE_AUTH_TYPE_DIRECT_MAPPING
const APACHE_AUTH_TYPE_BY_FUNCTION
@classDescription Apache based authentication
supportsRedirects()
Returns true, if the current auth mode allows redirection to e.g to loginScreen, public section....
__construct($storageDriver, $options='', $loginFunction='', $showLogin=true)
Contructor.
static supportsRedirects()
Are redirects supported?
Base class for ILIAS Exception handling.
static redirect($a_script)
static getHtmlPath($relative_path)
get url of path
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']