◆ __buildAuth()
ilSoapAuthenticationCAS::__buildAuth |
( |
| ) |
|
Definition at line 211 of file class.ilSoapAuthenticationCAS.php.
References $GLOBALS, $ilDB, CAS_VERSION_2_0, init(), and phpCAS\setFixedServiceURL().
Referenced by authenticate(), and validateSession().
213 if (!is_object($this->db)) {
214 require_once(
"./Services/Database/classes/class.ilDBWrapperFactory.php");
215 $ilDB = ilDBWrapperFactory::getWrapper();
216 $ilDB->initFromIniFile();
221 $GLOBALS[
'DIC'][
"ilDB"] = $this->db;
222 $this->
init->initSettings();
224 $this->
init->buildHTTPPath();
225 include_once
'./Services/Administration/classes/class.ilSetting.php';
238 $cas_set[
"cas_server"] = $set->get(
"cas_server");
239 $cas_set[
"cas_port"] = $set->get(
"cas_port");
240 $cas_set[
"cas_uri"] = $set->get(
"cas_uri");
242 $auth_params = array(
244 "server_hostname" => $cas_set[
"cas_server"],
245 "server_port" => $cas_set[
"cas_port"],
246 "server_uri" => $cas_set[
"cas_uri"]);
248 include_once(
"Services/CAS/classes/class.ilCASAuth.php");
249 $this->auth =
new ilCASAuth($auth_params);
static setFixedServiceURL($url)
Set the fixed URL that will be set as the CAS service parameter.
while(count($oldTaskList) > 0) foreach(array_keys($newTaskList) as $task) init()
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
◆ authenticate()
ilSoapAuthenticationCAS::authenticate |
( |
| ) |
|
Definition at line 84 of file class.ilSoapAuthenticationCAS.php.
References __buildAuth(), ilObjUser\_checkExternalAuthAccount(), phpCAS\checkAuthentication(), and init().
86 include_once(
"./Services/Init/classes/class.ilInitialisation.php");
88 $this->
init->requireCommonIncludes();
92 if (!$this->getClient()) {
93 $this->__setMessage(
'No client given');
97 if (!$this->getUsername()) {
98 $this->__setMessage(
'No username given');
102 if (!$this->__buildDSN()) {
103 $this->__setMessage(
'Error building dsn/Wrong client Id?');
107 if (!$this->__setSessionSaveHandler()) {
110 if (!$this->__checkAgreement(
'cas')) {
118 if ($this->soap_check
and !$this->__checkSOAPEnabled()) {
119 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
120 $this->__setMessageCode(
'Server');
128 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
132 $this->auth->forceCASAuth();
134 if ($this->getUsername() != $this->auth->getCASUser()) {
135 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user does not match to ticket user.');
139 include_once(
'./Services/User/classes/class.ilObjUser.php');
141 if ($local_user ==
"") {
142 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): SOAP CAS user authenticated but not existing in ILIAS user database.');
152 $this->auth->start();
154 if (!$this->auth->getAuth()) {
155 $this->__getAuthStatus();
160 $this->setSid(session_id());
static checkAuthentication()
This method is called to check if the user is already authenticated locally or has a global cas sessi...
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
ILIAS Initialisation Utility Class perform basic setup: init database handler, load configuration fil...
while(count($oldTaskList) > 0) foreach(array_keys($newTaskList) as $task) init()
◆ getPT()
ilSoapAuthenticationCAS::getPT |
( |
| ) |
|
◆ setPT()
ilSoapAuthenticationCAS::setPT |
( |
|
$a_pt | ) |
|
◆ validateSession()
ilSoapAuthenticationCAS::validateSession |
( |
| ) |
|
Definition at line 166 of file class.ilSoapAuthenticationCAS.php.
References __buildAuth().
168 if (!$this->getClient()) {
169 $this->__setMessage(
'No client given');
172 if (!$this->getSid()) {
173 $this->__setMessage(
'No session id given');
177 if (!$this->__buildDSN()) {
178 $this->__setMessage(
'Error building dsn');
181 if (!$this->__setSessionSaveHandler()) {
187 if ($this->soap_check
and !$this->__checkSOAPEnabled()) {
188 $this->__setMessage(
'SOAP is not enabled in ILIAS administration for this client');
189 $this->__setMessageCode(
'Server');
195 if (!$this->auth->checkCASAuth()) {
196 $this->__setMessage(
'ilSOAPAuthenticationCAS::authenticate(): No valid CAS authentication.');
199 $this->auth->forceCASAuth();
201 $this->auth->start();
202 if (!$this->auth->getAuth()) {
203 $this->__setMessage(
'Session not valid');
The documentation for this class was generated from the following file: