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) {
38 if (!$this->
getSettings()->
get(
'apache_enable_auth',
false)) {
42 if (!$this->
getSettings()->
get(
'apache_auth_authenticate_on_login_page',
false)) {
48 isset(
$_GET[
'passed_sso']) ||
49 (
defined(
'IL_CERT_SSO') && IL_CERT_SSO ==
'1')
55 if (substr(
$path, 0, 1) ===
'/') {
59 if (substr(
$path, 0, 4) !==
'http') {
60 $parts = parse_url(ILIAS_HTTP_PATH);
61 $path = $parts[
'scheme'] .
'://' . $parts[
'host'] .
'/' .
$path;
66 './sso/index.php?force_mode_apache=1&' .
67 'r=' . urlencode(
$path) .
69 '&ilias_path=' . urlencode(ILIAS_HTTP_PATH)
88 $this->
getLogger()->debug($this->
getSettings()->
get(
'apache_auth_username_direct_mapping_fieldname',
''));
90 include_once
'./Services/AuthApache/classes/class.ilAuthProviderApache.php';
92 switch ($this->
getSettings()->
get(
'apache_auth_username_config_type')) {
94 if (array_key_exists($this->
getSettings()->
get(
'apache_auth_username_direct_mapping_fieldname'),
$_SERVER)) {
100 include_once
'Services/AuthApache/classes/custom_username_func.php';
111 if (!isset(
$_GET[
'r']) || 0 == strlen(trim(
$_GET[
'r']))) {
117 $validDomains =
array();
118 $path = ILIAS_DATA_DIR .
'/' . CLIENT_ID .
'/apache_auth_allowed_domains.txt';
119 if (file_exists(
$path) && is_readable(
$path)) {
122 $validDomains[] = trim($line);
127 $urlParts = parse_url(
$url);
128 $redirectDomain = $urlParts[
'host'];
130 $validRedirect =
false;
131 foreach ($validDomains as $validDomain) {
132 if ($redirectDomain === $validDomain) {
133 $validRedirect =
true;
137 if (strlen($redirectDomain) > (strlen($validDomain) + 1)) {
138 if (substr($redirectDomain, (0 - strlen($validDomain) - 1)) ===
'.' . $validDomain) {
139 $validRedirect =
true;
145 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
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)
Description of class class.
static supportsRedirects()
Are redirects supported?