33 include_once(
'./Services/Authentication/classes/class.ilAuthUtils.php');
51 include_once(
'./Services/Authentication/classes/class.ilAuthModeDetermination.php');
54 $this->auth_modes = $this->settings->getAuthModeSequence();
57 $this->first_auth_method =
false;
67 public function setIdle($time,$add =
false)
69 $this->auth->setIdle($time,$add);
79 $this->auth->setExpire($time,$add);
91 $this->auth->logout();
107 if($this->auth->checkAuth())
111 $this->auth->logout();
116 $ilLog->write(__METHOD__.
': Authentication failed.');
129 return $this->auth->getUsername();
152 $this->auth->start();
164 return $this->auth->getStatus();
177 global
$ilLog,$ilClientIniFile;
179 if(!$this->current_auth_mode = current($this->auth_modes))
183 next($this->auth_modes);
184 switch($this->current_auth_mode)
187 $ilLog->write(__METHOD__.
': Current Authentication method is LDAP.');
188 include_once
'Services/LDAP/classes/class.ilAuthLDAP.php';
189 $auth_params[
'sessionName'] =
"_authhttp".md5(CLIENT_ID);
194 $ilLog->write(__METHOD__.
': Current Authentication method is RADIUS.');
195 include_once(
'Services/Radius/classes/class.ilAuthRadius.php');
196 $auth_params[
'sessionName'] =
"_authhttp".md5(CLIENT_ID);
200 $ilLog->write(__METHOD__.
': Current Authentication method is ILIAS DB.');
201 $auth_params = array(
203 'table' => $ilClientIniFile->readVariable(
"auth",
"table"),
204 'usernamecol' => $ilClientIniFile->readVariable(
"auth",
"usercol"),
205 'passwordcol' => $ilClientIniFile->readVariable(
"auth",
"passcol")
207 $auth_params[
'sessionName'] =
"_authhttp".md5(CLIENT_ID);
208 require_once
'class.ilAuthContainerMDB2.php';
210 $authContainer->setObserversEnabled(
true);
211 $this->auth =
new Auth($authContainer, $auth_params,
"",
false);
214 if(!$this->first_auth_method)
216 $this->auth->start();