ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
ilSOAPAuth Class Reference

Class SOAPAuth. More...

+ Collaboration diagram for ilSOAPAuth:

Static Public Member Functions

static testConnection ($a_ext_uid, $a_soap_pw, $a_new_user)
 Constructor public. More...
 

Data Fields

 $valid = array()
 

Detailed Description

Class SOAPAuth.

SOAP Authentication class.

Definition at line 33 of file class.ilSOAPAuth.php.

Member Function Documentation

◆ testConnection()

static ilSOAPAuth::testConnection (   $a_ext_uid,
  $a_soap_pw,
  $a_new_user 
)
static

Constructor public.

Test connection with values of soap auth administration settings

Definition at line 45 of file class.ilSOAPAuth.php.

References $ilSetting, $namespace, and $valid.

Referenced by ilObjAuthSettingsGUI\editSOAPObject().

46  {
47  global $ilSetting;
48 
49  $settings = $ilSetting->getAll();
50 
51  $server_hostname = $settings["soap_auth_server"];
52  $server_port = (int) $settings["soap_auth_port"];
53  $server_uri = $settings["soap_auth_uri"];
54  $namespace = $settings["soap_auth_namespace"];
55  $use_dotnet = $settings["soap_auth_use_dotnet"];
56  if ($settings["soap_auth_use_https"]) {
57  $uri = "https://";
58  } else {
59  $uri = "http://";
60  }
61 
62  $uri.= $server_hostname;
63 
64  if ($server_port > 0) {
65  $uri.= ":" . $server_port;
66  }
67 
68  if ($server_uri != "") {
69  $uri.= "/" . $server_uri;
70  }
71 
72  $soap_client = new nusoap_client($uri);
73  if ($err = $soap_client->getError()) {
74  return "SOAP Authentication Initialisation Error: " . $err;
75  }
76 
77  $soapAction = "";
78  $nspref = "";
79  if ($use_dotnet) {
80  $soapAction = $namespace . "/isValidSession";
81  $nspref = "ns1:";
82  }
83 
84  $valid = $soap_client->call(
85  'isValidSession',
86  array($nspref . 'ext_uid' => $a_ext_uid,
87  $nspref . 'soap_pw' => $a_soap_pw,
88  $nspref . 'new_user' => $a_new_user),
89  $namespace,
90  $soapAction
91  );
92 
93  return
94  "<br>== Request ==" .
95  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->request)), ENT_QUOTES) . '</pre><br>' .
96  "<br>== Response ==" .
97  "<br>Valid: -" . $valid["valid"] . "-" .
98  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->response)), ENT_QUOTES) . '</pre>';
99  }
if($err=$client->getError()) $namespace
[nu]soapclient higher level class for easy usage.
Definition: nusoap.php:7072
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

Field Documentation

◆ $valid

ilSOAPAuth::$valid = array()

Definition at line 35 of file class.ilSOAPAuth.php.

Referenced by testConnection().


The documentation for this class was generated from the following file: