Authentication against external SOAP server
More...
Authentication against external SOAP server
- Todo:
- This class should inherit either from Auth_Container_SOAP or Auth_Container_SOAP5
- Author
- Stefan Meyer smeye.nosp@m.r.il.nosp@m.ias@g.nosp@m.mx.d.nosp@m.e
- Version
- $id$
Definition at line 35 of file class.ilAuthContainerSOAP.php.
◆ __construct()
ilAuthContainerSOAP::__construct |
( |
| ) |
|
◆ fetchData()
ilAuthContainerSOAP::fetchData |
( |
|
$a_username, |
|
|
|
$a_password, |
|
|
|
$isChallengeResponse = false |
|
) |
| |
Call is isValidSession of soap server.
- Returns
- bool
- Parameters
-
string | $a_username | |
string | $a_password | |
bool | $isChallengeResponse,[optional] | |
Definition at line 97 of file class.ilAuthContainerSOAP.php.
References $GLOBALS, $new_user, $valid, ilObjUser\_checkExternalAuthAccount(), and array.
99 $GLOBALS[
'ilLog']->write(__METHOD__.
': Soap auth fetch data');
104 if ($local_user ==
"")
115 if ($this->use_dotnet)
117 $soapAction = $this->server_nms.
"/isValidSession";
120 $valid = $this->client->call(
'isValidSession',
121 array($nspref.
'ext_uid' => $a_username,
122 $nspref.
'soap_pw' => $a_password,
132 if (trim(
$valid[
"valid"]) ==
"false")
138 $valid[
"local_user"] = $local_user;
140 return $valid[
'valid'] ==
true;
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
Create styles array
The data for the language used.
static _checkExternalAuthAccount($a_auth, $a_account)
check whether external account and authentication method matches with a user
◆ initClient()
ilAuthContainerSOAP::initClient |
( |
| ) |
|
Init soap client.
- Returns
Definition at line 65 of file class.ilAuthContainerSOAP.php.
References $ilSetting, and $server_host.
Referenced by __construct().
69 $this->server_host = $ilSetting->get(
'soap_auth_server');
70 $this->server_port = $ilSetting->get(
'soap_auth_port');
71 $this->server_uri = $ilSetting->get(
'soap_auth_uri');
72 $this->server_https = $ilSetting->get(
'soap_auth_use_https');
73 $this->server_nms = $ilSetting->get(
'soap_auth_namespace');
74 $this->use_dot_net = $ilSetting->get(
'use_dotnet');
76 $this->uri = $this->server_https ?
'https://' :
'http://';
79 if($this->server_port > 0)
81 $this->uri .= (
':'.$this->server_port);
85 $this->uri .= (
'/'.$this->server_uri);
[nu]soapclient higher level class for easy usage.
◆ loginObserver()
ilAuthContainerSOAP::loginObserver |
( |
|
$a_username, |
|
|
|
$a_auth |
|
) |
| |
Called after login and successful call of fetch data.
- Returns
- Parameters
-
object | $a_username | |
object | $a_auth | |
Definition at line 149 of file class.ilAuthContainerSOAP.php.
References $GLOBALS, $ilSetting, $lng, ilAuthUtils\_generateLogin(), ilObjUserFolder\_lookupNewAccountMail(), AUTH_SOAP_NO_ILIAS_USER, ilUtil\generatePasswords(), IL_PASSWD_CRYPTED, IL_PASSWD_PLAIN, and time.
153 $GLOBALS[
'ilLog']->write(__METHOD__.
': SOAP login observer called');
176 $local_user = $this->response[
"local_user"];
177 if ($local_user !=
"")
180 $a_auth->setAuth($local_user);
183 if(!$ilSetting->get(
"soap_auth_create_users"))
193 $newUser[
"firstname"] = $this->response[
"firstname"];
194 $newUser[
"lastname"] = $this->response[
"lastname"];
195 $newUser[
"email"] = $this->response[
"email"];
197 $newUser[
"login"] = $local_user;
200 $newUser[
"passwd"] =
"";
207 if ($ilSetting->get(
"soap_auth_allow_local") &&
208 $ilSetting->get(
"soap_auth_account_mail"))
212 $newUser[
"passwd"] = $pw;
217 $newUser[
"auth_mode"] =
"soap";
218 $newUser[
"ext_account"] = $a_username;
219 $newUser[
"profile_incomplete"] = 1;
222 $userObj->assignData($newUser);
223 $userObj->setTitle($userObj->getFullname());
224 $userObj->setDescription($userObj->getEmail());
227 $userObj->setLanguage($lng->lang_default);
230 $userObj->setTimeLimitOwner(7);
231 $userObj->setTimeLimitUnlimited(1);
232 $userObj->setTimeLimitFrom(
time());
233 $userObj->setTimeLimitUntil(
time());
236 $userObj->setOwner(0);
238 $userObj->setActive(1);
240 $userObj->updateOwner();
243 $userObj->saveAsNew(
false);
246 $userObj->writePrefs();
249 $rbacadmin->assignUser($ilSetting->get(
'soap_auth_user_default_role'), $userObj->getId(),
true);
252 if ($ilSetting->get(
"soap_auth_account_mail"))
254 include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
256 if (trim($amail[
"body"]) !=
"" && trim($amail[
"subject"]) !=
"")
258 include_once(
"Services/Mail/classes/class.ilAccountMail.php");
263 $acc_mail->setUserPassword($pw);
265 $acc_mail->setUser($userObj);
271 $a_auth->setAuth($local_user);
static _generateLogin($a_login)
generate free login by starting with a default string and adding postfix numbers
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
static generatePasswords($a_number)
Generate a number of passwords.
const AUTH_SOAP_NO_ILIAS_USER
static _lookupNewAccountMail($a_lang)
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
◆ $client
ilAuthContainerSOAP::$client = null |
|
protected |
◆ $response
ilAuthContainerSOAP::$response = null |
|
protected |
◆ $server_host
ilAuthContainerSOAP::$server_host = null |
|
protected |
◆ $server_https
ilAuthContainerSOAP::$server_https = null |
|
protected |
◆ $server_nms
ilAuthContainerSOAP::$server_nms = null |
|
protected |
◆ $server_port
ilAuthContainerSOAP::$server_port = null |
|
protected |
◆ $server_uri
ilAuthContainerSOAP::$server_uri = null |
|
protected |
◆ $uri
ilAuthContainerSOAP::$uri = null |
|
protected |
◆ $use_dot_net
ilAuthContainerSOAP::$use_dot_net = null |
|
protected |
The documentation for this class was generated from the following file: