34 include_once
'Auth/Auth.php';
36 define(
'IL_AUTH_MD5',1);
37 define(
'IL_AUTH_PLAIN',2);
79 $this->check_setting =
true;
86 $this->client = $a_client;
95 $this->username = $a_username;
96 $_POST[
'username'] = $a_username;
104 $this->password = $a_password;
105 $_POST[
'password'] = $a_password;
123 return $this->message;
127 return $this->message_code;
131 $this->message = $a_message;
135 $this->message_code = $a_message_code;
140 $this->password_type = $a_type;
144 return isset($this->password_type) ? $this->password_type :
IL_AUTH_PLAIN;
172 $this->auth->start();
174 if(!$this->auth->getAuth())
181 $this->
setSid(session_id());
194 $this->auth->start();
221 $this->auth->start();
222 if(!$this->auth->getAuth())
246 #if(!$this->__buildAuth())
250 #if(!$this->__setSessionSaveHandler())
256 #$this->auth->start();
257 $this->auth->logout();
266 include_once
'./classes/class.ilIniFile.php';
269 $this->ilias_ini =&
new ilIniFile(
'./ilias.ini.php');
270 $this->ilias_ini->read();
272 if(!@file_exists(
"./".$this->ilias_ini->readVariable(
'clients',
'path').
"/".$this->
getClient().
"/client.ini.php"))
280 $this->ini =&
new ilIniFile(
"./".$this->ilias_ini->readVariable(
'clients',
'path').
"/".$this->
getClient().
"/client.ini.php");
283 $this->dsn = $this->ini->readVariable(
"db",
"type").
284 "://".$this->ini->readVariable(
"db",
"user").
285 ":".$this->ini->readVariable(
"db",
"pass").
286 "@".$this->ini->readVariable(
"db",
"host").
287 "/".$this->ini->readVariable(
"db",
"name");
306 $this->auth_params = array(
308 'table' => $this->ini->readVariable(
"auth",
"table"),
309 'usernamecol' => $this->ini->readVariable(
"auth",
"usercol"),
310 'passwordcol' => $this->ini->readVariable(
"auth",
"passcol"),
311 'sessionName' =>
"_authhttp".md5($realm)
316 $this->auth_params[
'cryptType'] =
'none';
319 require_once
'class.ilAuthContainerMDB2.php';
321 $this->auth =
new Auth($authContainerDB, $this->auth_params,
"",
false);
328 include_once
'./include/inc.db_session_handler.php';
329 include_once
"./Services/Utilities/classes/class.ilUtil.php";
330 include_once
'./classes/class.ilErrorHandling.php';
331 include_once
'./classes/class.ilDBx.php';
336 if(ini_get(
'session.save_handler') !=
'user')
338 ini_set(
"session.save_handler",
"user");
353 switch($this->auth->getStatus())