24define (
'APACHE_AUTH_TYPE_DIRECT_MAPPING', 1);
 
   25define (
'APACHE_AUTH_TYPE_EXTENDED_MAPPING', 2);
 
   26define (
'APACHE_AUTH_TYPE_BY_FUNCTION', 3);
 
   55        public function __construct($a_container,$a_addition_options = array())
 
   59                parent::__construct($a_container,$a_addition_options,
'',
false);
 
   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', 
'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();
 
setSessionName($name='session')
Set name of the session to a customized value.
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($a_container, $a_addition_options=array())
Contructor.
initAuth()
Init auth object Enable logging, set callbacks...
static supportsRedirects()
Are redirects supported?
Base class for ILIAS Exception handling.
static redirect($a_script)
http redirect to other script
static getHtmlPath($relative_path)
get url of path
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']