34 include_once
'./webservice/soap/classes/class.ilSoapAuthentication.php';
77 $_GET[
'ticket'] = $a_pt;
86 include_once(
"./Services/Init/classes/class.ilInitialisation.php");
88 $this->init->requireCommonIncludes();
92 if(!$this->getClient())
94 $this->__setMessage(
'No client given');
98 if(!$this->getUsername())
100 $this->__setMessage(
'No username given');
104 if(!$this->__buildDSN())
106 $this->__setMessage(
'Error building dsn/Wrong client Id?');
110 if(!$this->__setSessionSaveHandler())
114 if(!$this->__checkAgreement(
'cas'))
124 if($this->soap_check
and !$this->__checkSOAPEnabled())
126 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
127 $this->__setMessageCode(
'Server');
136 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
140 $this->auth->forceCASAuth();
142 if ($this->getUsername() != $this->auth->getCASUser())
144 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user does not match to ticket user.');
148 include_once(
'./Services/User/classes/class.ilObjUser.php');
150 if ($local_user ==
"")
152 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user authenticated but not existing in ILIAS user database.');
162 $this->auth->start();
164 if(!$this->auth->getAuth())
166 $this->__getAuthStatus();
171 $this->setSid(session_id());
179 if(!$this->getClient())
181 $this->__setMessage(
'No client given');
186 $this->__setMessage(
'No session id given');
190 if(!$this->__buildDSN())
192 $this->__setMessage(
'Error building dsn');
195 if(!$this->__setSessionSaveHandler())
203 if($this->soap_check
and !$this->__checkSOAPEnabled())
205 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
206 $this->__setMessageCode(
'Server');
212 if (!$this->auth->checkCASAuth())
214 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
217 $this->auth->forceCASAuth();
219 $this->auth->start();
220 if(!$this->auth->getAuth())
222 $this->__setMessage(
'Session not valid');
233 if (!is_object($this->db))
235 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
236 $ilDB = ilDBWrapperFactory::getWrapper();
237 $ilDB->initFromIniFile();
243 $this->init->initSettings();
245 $this->init->buildHTTPPath();
246 include_once
'./Services/Administration/classes/class.ilSetting.php';
259 $cas_set[
"cas_server"] = $set->get(
"cas_server");
260 $cas_set[
"cas_port"] = $set->get(
"cas_port");
261 $cas_set[
"cas_uri"] = $set->get(
"cas_uri");
263 $auth_params =
array(
265 "server_hostname" => $cas_set[
"cas_server"],
266 "server_port" => $cas_set[
"cas_port"],
267 "server_uri" => $cas_set[
"cas_uri"]);
269 include_once(
"Services/CAS/classes/class.ilCASAuth.php");
270 $this->auth =
new ilCASAuth($auth_params);
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static checkAuthentication()
This method is called to check if the user is already authenticated locally or has a global cas sessi...
Create styles array
The data for the language used.
static setFixedServiceURL($url)
Set the fixed URL that will be set as the CAS service parameter.
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user