14 include_once
'Auth/Auth.php';
16 define(
'IL_AUTH_MD5',1);
17 define(
'IL_AUTH_PLAIN',2);
59 $this->check_setting =
true;
66 $this->client = $a_client;
75 $this->username = $a_username;
76 $_POST[
'username'] = $a_username;
84 $this->password = $a_password;
85 $_POST[
'password'] = $a_password;
103 return $this->message;
107 return $this->message_code;
111 $this->message = $a_message;
115 $this->message_code = $a_message_code;
120 $this->password_type = $a_type;
124 return isset($this->password_type) ? $this->password_type :
IL_AUTH_PLAIN;
152 $this->auth->start();
154 if(!$this->auth->getAuth())
161 $this->
setSid(session_id());
174 $this->auth->start();
201 $this->auth->start();
202 if(!$this->auth->getAuth())
226 #if(!$this->__buildAuth())
230 #if(!$this->__setSessionSaveHandler())
236 #$this->auth->start();
237 $this->auth->logout();
246 include_once
'./Services/Init/classes/class.ilIniFile.php';
249 $this->ilias_ini =&
new ilIniFile(
'./ilias.ini.php');
250 $this->ilias_ini->read();
252 if(!@file_exists(
"./".$this->ilias_ini->readVariable(
'clients',
'path').
"/".$this->
getClient().
"/client.ini.php"))
260 $this->ini =&
new ilIniFile(
"./".$this->ilias_ini->readVariable(
'clients',
'path').
"/".$this->
getClient().
"/client.ini.php");
263 include_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
265 $this->ini->readVariable(
"db",
"inactive_mysqli"));
266 $this->db->setDBUser($this->ini->readVariable(
"db",
"user"));
267 $this->db->setDBPassword($this->ini->readVariable(
"db",
"pass"));
268 $this->db->setDBName($this->ini->readVariable(
"db",
"name"));
269 $this->db->setDBHost($this->ini->readVariable(
"db",
"host"));
270 $this->dsn = $this->db->getDSN();
290 $this->auth_params = array(
291 'dsn' => $this->db->getDSN(),
292 'table' => $this->ini->readVariable(
"auth",
"table"),
293 'usernamecol' => $this->ini->readVariable(
"auth",
"usercol"),
294 'passwordcol' => $this->ini->readVariable(
"auth",
"passcol"),
295 'sessionName' =>
"_authhttp".md5($realm)
300 $this->auth_params[
'cryptType'] =
'none';
303 include_once
'./Services/Authentication/classes/class.ilAuthContainerDatabase.php';
305 $this->auth =
new Auth($authContainerDB, $this->auth_params,
"",
false);
312 require_once
"./Services/Authentication/classes/class.ilSessionDBHandler.php";
313 include_once
"./Services/Utilities/classes/class.ilUtil.php";
314 include_once
'./Services/Init/classes/class.ilErrorHandling.php';
315 include_once
'./Services/Database/classes/class.ilDB.php';
317 $this->db->connect();
320 if(ini_get(
'session.save_handler') !=
'user')
322 ini_set(
"session.save_handler",
"user");
325 if (!$db_session_handler->setSaveHandler())
338 switch($this->auth->getStatus())