25 include_once(
"Auth/Auth.php");
26 if (version_compare(PHP_VERSION,
'5.3.0',
'>=') or 1)
28 include_once
'./webservice/soap/lib2/nusoap.php';
32 include_once
'./webservice/soap/lib/nusoap.php';
41 class ilSOAPAuth
extends Auth
53 public static function testConnection($a_ext_uid, $a_soap_pw, $a_new_user)
57 $settings = $ilSetting->getAll();
59 $server_hostname = $settings[
"soap_auth_server"];
60 $server_port = (int) $settings[
"soap_auth_port"];
61 $server_uri = $settings[
"soap_auth_uri"];
63 $use_dotnet = $settings[
"soap_auth_use_dotnet"];
64 if ($settings[
"soap_auth_use_https"])
73 $uri.= $server_hostname;
77 $uri.=
":".$server_port;
80 if ($server_uri !=
"")
82 $uri.=
"/".$server_uri;
86 if (
$err = $soap_client->getError())
88 return "SOAP Authentication Initialisation Error: ".$err;
99 $valid = $soap_client->call(
'isValidSession',
100 array($nspref.
'ext_uid' => $a_ext_uid,
101 $nspref.
'soap_pw' => $a_soap_pw,
102 $nspref.
'new_user' => $a_new_user),
108 '<br><pre>' . htmlspecialchars(str_replace(
"\" ",
"\"\n ", str_replace(
">",
">\n", $soap_client->request)), ENT_QUOTES) .
'</pre><br>'.
109 "<br>== Response ==".
110 "<br>Valid: -".$valid[
"valid"].
"-".
111 '<br><pre>' . htmlspecialchars(str_replace(
"\" ",
"\"\n ", str_replace(
">",
">\n", $soap_client->response)), ENT_QUOTES) .
'</pre>';