| 
| static  | testConnection (string $a_ext_uid, string $a_soap_pw, bool $a_new_user) | 
|   | 
Definition at line 21 of file class.ilSOAPAuth.php.
 
◆ testConnection()
  
  
      
        
          | static ilSOAPAuth::testConnection  | 
          ( | 
          string  | 
          $a_ext_uid,  | 
         
        
           | 
           | 
          string  | 
          $a_soap_pw,  | 
         
        
           | 
           | 
          bool  | 
          $a_new_user  | 
         
        
           | 
          ) | 
           |  | 
         
       
   | 
  
static   | 
  
 
Definition at line 23 of file class.ilSOAPAuth.php.
References $ilSetting, $namespace, $valid, and ILIAS\Repository\int().
Referenced by ilObjAuthSettingsGUI\testSoapAuthConnectionObject().
   27         $settings = $ilSetting->getAll();
    29         $server_hostname = (string) ($settings[
'soap_auth_server'] ?? 
'');
    30         $server_port = (
int) ($settings[
'soap_auth_port'] ?? 0);
    31         $server_uri = (string) ($settings[
'soap_auth_uri'] ?? 
'');
    32         $namespace = (string) ($settings[
'soap_auth_namespace'] ?? 
'');
    33         $use_dotnet = (bool) ($settings[
'soap_auth_use_dotnet'] ?? 
false);
    35         if (isset($settings[
'soap_auth_use_https']) && $settings[
'soap_auth_use_https']) {
    39         $uri .= $server_hostname;
    41         if ($server_port > 0) {
    42             $uri .= 
':' . $server_port;
    45         if ($server_uri !== 
'') {
    46             $uri .= 
'/' . $server_uri;
    49         require_once __DIR__ . 
'/../../soap/lib/nusoap.php';
    51         if ($err = $soap_client->getError()) {
    52             return 'SOAP Authentication Initialisation Error: ' . $err;
    62         $valid = $soap_client->call(
    65                 $nspref . 
'ext_uid' => $a_ext_uid,
    66                 $nspref . 
'soap_pw' => $a_soap_pw,
    67                 $nspref . 
'new_user' => $a_new_user
    75             '<br><pre>' . htmlspecialchars(str_replace(
'" ', 
"\"\n ", str_replace(
'>', 
">\n", $soap_client->request)), ENT_QUOTES) . 
'</pre><br>' .
    76             '<br>== Response ==' .
    77             '<br>Valid: -' . 
$valid[
'valid'] . 
'-' .
    78             '<br><pre>' . htmlspecialchars(str_replace(
'" ', 
"\"\n ", str_replace(
'>', 
">\n", $soap_client->response)), ENT_QUOTES) . 
'</pre>';
 if($err=$client->getError()) $namespace
 
[nu]soapclient higher level class for easy usage. 
 
 
 
 
The documentation for this class was generated from the following file: