24include_once 
'Auth/Container/LDAP.php';
 
   25include_once(
"./webservice/soap/lib/nusoap.php");
 
   57        parent::__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) {
 
   82        if ($this->server_uri) {
 
   95    public function fetchData($a_username, $a_password, $isChallengeResponse = 
false)
 
   97        $GLOBALS[
'ilLog']->write(__METHOD__ . 
': Soap auth fetch data');
 
  102        if ($local_user == 
"") {
 
  110        if ($this->use_dotnet) {
 
  111            $soapAction = $this->server_nms . 
"/isValidSession";
 
  114        $valid = $this->client->call(
 
  116            array($nspref . 
'ext_uid' => $a_username,
 
  117                $nspref . 
'soap_pw' => $a_password,
 
  128        if (trim(
$valid[
"valid"]) == 
"false") {
 
  133        $valid[
"local_user"] = $local_user;
 
  135        return $valid[
'valid'] == 
true;
 
  148        $GLOBALS[
'ilLog']->write(__METHOD__ . 
': SOAP login observer called');
 
  171        $local_user = $this->response[
"local_user"];
 
  172        if ($local_user != 
"") {
 
  174            $a_auth->setAuth($local_user);
 
  177        if (!
$ilSetting->get(
"soap_auth_create_users")) {
 
  186        $newUser[
"firstname"] = $this->response[
"firstname"];
 
  187        $newUser[
"lastname"] = $this->response[
"lastname"];
 
  188        $newUser[
"email"] = $this->response[
"email"];
 
  190        $newUser[
"login"] = $local_user;
 
  193        $newUser[
"passwd"] = 
"";
 
  200        if (
$ilSetting->get(
"soap_auth_allow_local") &&
 
  204            $newUser[
"passwd"] = $pw;
 
  209        $newUser[
"auth_mode"] = 
"soap";
 
  210        $newUser[
"ext_account"] = $a_username;
 
  211        $newUser[
"profile_incomplete"] = 1;
 
  214        $userObj->assignData($newUser);
 
  215        $userObj->setTitle($userObj->getFullname());
 
  216        $userObj->setDescription($userObj->getEmail());
 
  219        $userObj->setLanguage(
$lng->lang_default);
 
  222        $userObj->setTimeLimitOwner(7);
 
  223        $userObj->setTimeLimitUnlimited(1);
 
  224        $userObj->setTimeLimitFrom(time());
 
  225        $userObj->setTimeLimitUntil(time());
 
  228        $userObj->setOwner(0);
 
  230        $userObj->setActive(1);
 
  232        $userObj->updateOwner();
 
  235        $userObj->saveAsNew(
false);
 
  238        $userObj->writePrefs();
 
  241        $rbacadmin->assignUser(
$ilSetting->get(
'soap_auth_user_default_role'), $userObj->getId(), 
true);
 
  244        if (
$ilSetting->get(
"soap_auth_account_mail")) {
 
  245            include_once(
'./Services/User/classes/class.ilObjUserFolder.php');
 
  247            if (trim($amail[
"body"]) != 
"" && trim($amail[
"subject"]) != 
"") {
 
  248                include_once(
"Services/Mail/classes/class.ilAccountMail.php");
 
  252                    $acc_mail->setUserPassword($pw);
 
  254                $acc_mail->setUser($userObj);
 
  260        $a_auth->setAuth($local_user);
 
An exception for terminatinating execution or to throw for unit testing.
const AUTH_SOAP_NO_ILIAS_USER
@classDescription Authentication against external SOAP server
loginObserver($a_username, $a_auth)
Called after login and successful call of fetch data.
__construct()
Constructor.
initClient()
Init soap client.
fetchData($a_username, $a_password, $isChallengeResponse=false)
Call is isValidSession of soap server.
static _generateLogin($a_login)
generate free login by starting with a default string and adding postfix numbers
static _lookupNewAccountMail($a_lang)
static _checkExternalAuthAccount($a_auth, $a_account, $tryFallback=true)
check whether external account and authentication method matches with a user
static generatePasswords($a_number)
Generate a number of passwords.
[nu]soapclient higher level class for easy usage.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.