4 include_once
'./Services/Authentication/classes/Frontend/class.ilAuthFrontendCredentials.php';
5 include_once
'./Services/Authentication/interfaces/interface.ilAuthCredentials.php';
22 parent::__construct();
24 include_once
'./Services/Administration/classes/class.ilSetting.php';
34 if(strcmp((
string) $_REQUEST[
'cmd'],
'force_login') === 0)
39 if(!$this->
getSettings()->
get(
'apache_enable_auth',
false))
44 if(!$this->
getSettings()->
get(
'apache_auth_authenticate_on_login_page',
false))
51 isset(
$_GET[
'passed_sso']) ||
52 (
defined(
'IL_CERT_SSO') && IL_CERT_SSO ==
'1')
59 if(substr(
$path,0,1) ===
'/')
64 if(substr(
$path, 0, 4) !==
'http')
66 $parts = parse_url(ILIAS_HTTP_PATH);
67 $path = $parts[
'scheme'] .
'://'. $parts[
'host'] .
'/' .
$path;
72 './sso/index.php?force_mode_apache=1&' .
73 'r=' . urlencode(
$path) .
75 '&ilias_path=' . urlencode(ILIAS_HTTP_PATH)
94 $this->
getLogger()->debug($this->
getSettings()->
get(
'apache_auth_username_direct_mapping_fieldname',
''));
96 include_once
'./Services/AuthApache/classes/class.ilAuthProviderApache.php';
98 switch($this->
getSettings()->
get(
'apache_auth_username_config_type'))
101 if(array_key_exists($this->
getSettings()->
get(
'apache_auth_username_direct_mapping_fieldname'),
$_SERVER))
108 include_once
'Services/AuthApache/classes/custom_username_func.php';
119 if(!isset(
$_GET[
'r']) || 0 == strlen(trim(
$_GET[
'r'])))
126 $validDomains =
array();
127 $path = ILIAS_DATA_DIR .
'/' . CLIENT_ID .
'/apache_auth_allowed_domains.txt';
134 $validDomains[] = trim($line);
139 $urlParts = parse_url(
$url);
140 $redirectDomain = $urlParts[
'host'];
142 $validRedirect =
false;
143 foreach($validDomains as $validDomain)
145 if($redirectDomain === $validDomain)
147 $validRedirect =
true;
151 if(strlen($redirectDomain) > (strlen($validDomain) + 1))
153 if(substr($redirectDomain, (0 - strlen($validDomain) - 1)) ===
'.' . $validDomain)
155 $validRedirect =
true;
161 return $validRedirect;
if((!isset($_SERVER['DOCUMENT_ROOT'])) OR(empty($_SERVER['DOCUMENT_ROOT']))) $_SERVER['DOCUMENT_ROOT']
tryAuthenticationOnLoginPage()
Check if an authentication attempt should be done when login page has been called.
Interface of auth credentials.
initFromRequest()
Init credentials from request.
static appendUrlParameterString($a_url, $a_par, $xml_style=false)
append URL parameter string ("par1=value1&par2=value2...") to given URL string
const IL_COOKIE_PATH(isset($_GET["client_id"]))
Description of class class.
const APACHE_AUTH_TYPE_DIRECT_MAPPING
__construct()
Constructor.
Reload workbook from saved file
static getHtmlPath($relative_path)
get url of path
Create styles array
The data for the language used.
setUsername($a_name)
Set username.
const APACHE_AUTH_TYPE_BY_FUNCTION
defined( 'APPLICATION_ENV')||define( 'APPLICATION_ENV'
static redirect($a_script)
http redirect to other script
Description of class class.
static supportsRedirects()
Are redirects supported?