ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilSOAPAuth Class Reference

Class SOAPAuth. More...

+ Inheritance diagram for ilSOAPAuth:
+ 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 34 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 46 of file class.ilSOAPAuth.php.

References $ilSetting, $namespace, and array.

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

Field Documentation

◆ $valid

ilSOAPAuth::$valid = array()

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


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