ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
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...
 
- Static Public Member Functions inherited from SimpleSAML\Utils\Auth
static getAdminLoginURL ($returnTo=null)
 Retrieve a admin login URL. More...
 
static isAdmin ()
 Check whether the current user is admin. More...
 
static requireAdmin ()
 Require admin access to the current page. 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, $valid, and array.

Referenced by ilObjAuthSettingsGUI\editSOAPObject().

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  $uri = "https://";
59  } else {
60  $uri = "http://";
61  }
62 
63  $uri.= $server_hostname;
64 
65  if ($server_port > 0) {
66  $uri.= ":" . $server_port;
67  }
68 
69  if ($server_uri != "") {
70  $uri.= "/" . $server_uri;
71  }
72 
73  $soap_client = new nusoap_client($uri);
74  if ($err = $soap_client->getError()) {
75  return "SOAP Authentication Initialisation Error: " . $err;
76  }
77 
78  $soapAction = "";
79  $nspref = "";
80  if ($use_dotnet) {
81  $soapAction = $namespace . "/isValidSession";
82  $nspref = "ns1:";
83  }
84 
85  $valid = $soap_client->call(
86  'isValidSession',
87  array($nspref . 'ext_uid' => $a_ext_uid,
88  $nspref . 'soap_pw' => $a_soap_pw,
89  $nspref . 'new_user' => $a_new_user),
90  $namespace,
91  $soapAction
92  );
93 
94  return
95  "<br>== Request ==" .
96  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->request)), ENT_QUOTES) . '</pre><br>' .
97  "<br>== Response ==" .
98  "<br>Valid: -" . $valid["valid"] . "-" .
99  '<br><pre>' . htmlspecialchars(str_replace("\" ", "\"\n ", str_replace(">", ">\n", $soap_client->response)), ENT_QUOTES) . '</pre>';
100  }
if($err=$client->getError()) $namespace
[nu]soapclient higher level class for easy usage.
Definition: nusoap.php:7064
Create styles array
The data for the language used.
global $ilSetting
Definition: privfeed.php:17
+ Here is the caller graph for this function:

Field Documentation

◆ $valid

ilSOAPAuth::$valid = array()

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

Referenced by testConnection().


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