34 include_once
'./webservice/soap/classes/class.ilSoapAuthentication.php';
40 parent::ilSOAPAuthentication();
82 $_GET[
'ticket'] = $a_pt;
91 include_once(
"./Services/Init/classes/class.ilInitialisation.php");
93 $this->init->requireCommonIncludes();
97 if(!$this->getClient())
99 $this->__setMessage(
'No client given');
103 if(!$this->getUsername())
105 $this->__setMessage(
'No username given');
109 if(!$this->__buildDSN())
111 $this->__setMessage(
'Error building dsn/Wrong client Id?');
115 if(!$this->__setSessionSaveHandler())
119 if(!$this->__checkAgreement(
'cas'))
129 if($this->soap_check and !$this->__checkSOAPEnabled())
131 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
132 $this->__setMessageCode(
'Server');
141 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
145 $this->auth->forceCASAuth();
147 if ($this->getUsername() != $this->auth->getCASUser())
149 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user does not match to ticket user.');
153 include_once(
'./Services/User/classes/class.ilObjUser.php');
155 if ($local_user ==
"")
157 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user authenticated but not existing in ILIAS user database.');
167 $this->auth->start();
169 if(!$this->auth->getAuth())
171 $this->__getAuthStatus();
176 $this->setSid(session_id());
184 if(!$this->getClient())
186 $this->__setMessage(
'No client given');
191 $this->__setMessage(
'No session id given');
195 if(!$this->__buildDSN())
197 $this->__setMessage(
'Error building dsn');
200 if(!$this->__setSessionSaveHandler())
208 if($this->soap_check and !$this->__checkSOAPEnabled())
210 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
211 $this->__setMessageCode(
'Server');
217 if (!$this->auth->checkCASAuth())
219 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
222 $this->auth->forceCASAuth();
224 $this->auth->start();
225 if(!$this->auth->getAuth())
227 $this->__setMessage(
'Session not valid');
238 if (!is_object($this->db))
240 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
242 $ilDB->initFromIniFile();
248 $this->init->initSettings();
250 $this->init->buildHTTPPath();
251 include_once
'./Services/Administration/classes/class.ilSetting.php';
264 $cas_set[
"cas_server"] = $set->get(
"cas_server");
265 $cas_set[
"cas_port"] = $set->get(
"cas_port");
266 $cas_set[
"cas_uri"] = $set->get(
"cas_uri");
268 $auth_params = array(
270 "server_hostname" => $cas_set[
"cas_server"],
271 "server_port" => $cas_set[
"cas_port"],
272 "server_uri" => $cas_set[
"cas_uri"]);
274 include_once(
"Services/CAS/classes/class.ilCASAuth.php");
275 $this->auth =
new ilCASAuth($auth_params);