ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
ILIAS\AuthSOAP\SoapDummyAuthServer Class Reference
+ Collaboration diagram for ILIAS\AuthSOAP\SoapDummyAuthServer:

Public Member Functions

 __construct (private readonly bool $use_wsdl=true)
 
 start ()
 
 enableWSDL (\soap_server $server)
 

Data Fields

const SERVICE_NAME = 'ILIAS SOAP Dummy Authentication Server'
 
const SERVICE_NAMESPACE = 'urn:SoapDummyAuthServer'
 

Private Member Functions

 isPostRequest ()
 
 handleNativeSoapRequest ()
 
 handleNusoapRequest ()
 
 createNusoapServer ()
 
 buildEndpointUri ()
 
 registerNusoapMethods (\soap_server $server)
 

Detailed Description

Definition at line 23 of file SoapDummyAuthServer.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\AuthSOAP\SoapDummyAuthServer::__construct ( private readonly bool  $use_wsdl = true)

Definition at line 28 of file SoapDummyAuthServer.php.

29 {
30 }

Member Function Documentation

◆ buildEndpointUri()

ILIAS\AuthSOAP\SoapDummyAuthServer::buildEndpointUri ( )
private

Definition at line 86 of file SoapDummyAuthServer.php.

86 : string
87 {
88 $https = (!empty($_SERVER['HTTPS']) && $_SERVER['HTTPS'] !== 'off');
89 $scheme = $https ? 'https' : 'http';
90 $host = $_SERVER['HTTP_HOST'] ?? 'localhost';
91 $script = $_SERVER['SCRIPT_NAME'] ?? '';
92
93 return $scheme . '://' . $host . $script;
94 }
$_SERVER['HTTP_HOST']
Definition: raiseError.php:26

References $_SERVER.

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\handleNativeSoapRequest().

+ Here is the caller graph for this function:

◆ createNusoapServer()

ILIAS\AuthSOAP\SoapDummyAuthServer::createNusoapServer ( )
private

Definition at line 71 of file SoapDummyAuthServer.php.

72 {
73 require_once __DIR__ . '/../../soap/lib/nusoap.php';
74 $server = new \soap_server();
75 $server->class = SoapDummyAuthHandler::class;
76
77 if ($this->use_wsdl) {
78 $this->enableWSDL($server);
79 }
80
82
83 return $server;
84 }
Backward compatibility.
Definition: nusoap.php:4565
$server
Definition: shib_login.php:28

References $server, ILIAS\AuthSOAP\SoapDummyAuthServer\enableWSDL(), and ILIAS\AuthSOAP\SoapDummyAuthServer\registerNusoapMethods().

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\handleNusoapRequest().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ enableWSDL()

ILIAS\AuthSOAP\SoapDummyAuthServer::enableWSDL ( \soap_server  $server)

Definition at line 96 of file SoapDummyAuthServer.php.

96 : bool
97 {
98 $server->configureWSDL(self::SERVICE_NAME, self::SERVICE_NAMESPACE);
99
100 return true;
101 }

References $server.

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\createNusoapServer().

+ Here is the caller graph for this function:

◆ handleNativeSoapRequest()

ILIAS\AuthSOAP\SoapDummyAuthServer::handleNativeSoapRequest ( )
private

Definition at line 48 of file SoapDummyAuthServer.php.

48 : void
49 {
50 $uri = $this->buildEndpointUri();
51
52 // Non-WSDL mode: nusoap WSDL describes RPC/encoded ops as "ns1:isValidSession", which
53 // native SoapServer cannot map when loading that WSDL. Dispatch via __soapCall instead.
54 $soap_server = new \SoapServer(null, [
55 'uri' => self::SERVICE_NAMESPACE,
56 'location' => $uri,
57 ]);
58 $soap_server->setObject(new SoapDummyAuthHandler());
59 $soap_server->handle();
60 }

References ILIAS\AuthSOAP\SoapDummyAuthServer\buildEndpointUri().

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ handleNusoapRequest()

ILIAS\AuthSOAP\SoapDummyAuthServer::handleNusoapRequest ( )
private

Definition at line 62 of file SoapDummyAuthServer.php.

62 : void
63 {
64 $server = $this->createNusoapServer();
65
66 $post_data = file_get_contents('php://input');
67
68 $server->service($post_data);
69 }

References $server, and ILIAS\AuthSOAP\SoapDummyAuthServer\createNusoapServer().

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\start().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ isPostRequest()

ILIAS\AuthSOAP\SoapDummyAuthServer::isPostRequest ( )
private

Definition at line 43 of file SoapDummyAuthServer.php.

43 : bool
44 {
45 return strcasecmp($_SERVER['REQUEST_METHOD'] ?? '', 'POST') === 0;
46 }

References $_SERVER.

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\start().

+ Here is the caller graph for this function:

◆ registerNusoapMethods()

ILIAS\AuthSOAP\SoapDummyAuthServer::registerNusoapMethods ( \soap_server  $server)
private

Definition at line 103 of file SoapDummyAuthServer.php.

103 : void
104 {
105 $server->wsdl->addComplexType(
106 'intArray',
107 'complexType',
108 'array',
109 '',
110 'SOAP-ENC:Array',
111 [],
112 [['ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:int[]']],
113 'xsd:int'
114 );
115
116 $server->wsdl->addComplexType(
117 'stringArray',
118 'complexType',
119 'array',
120 '',
121 'SOAP-ENC:Array',
122 [],
123 [['ref' => 'SOAP-ENC:arrayType', 'wsdl:arrayType' => 'xsd:string[]']],
124 'xsd:string'
125 );
126
127 $server->register(
128 'isValidSession',
129 [
130 'ext_uid' => 'xsd:string',
131 'soap_pw' => 'xsd:string',
132 'new_user' => 'xsd:boolean'
133 ],
134 [
135 'valid' => 'xsd:boolean',
136 'firstname' => 'xsd:string',
137 'lastname' => 'xsd:string',
138 'email' => 'xsd:string'
139 ],
140 self::SERVICE_NAMESPACE,
141 self::SERVICE_NAMESPACE . '#isValidSession',
142 'rpc',
143 'encoded',
144 'Dummy Session Validation'
145 );
146 }

References $server.

Referenced by ILIAS\AuthSOAP\SoapDummyAuthServer\createNusoapServer().

+ Here is the caller graph for this function:

◆ start()

ILIAS\AuthSOAP\SoapDummyAuthServer::start ( )

Definition at line 32 of file SoapDummyAuthServer.php.

32 : never
33 {
34 if ($this->isPostRequest()) {
36 } else {
37 $this->handleNusoapRequest();
38 }
39
40 exit();
41 }
exit
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References exit, ILIAS\AuthSOAP\SoapDummyAuthServer\handleNativeSoapRequest(), ILIAS\AuthSOAP\SoapDummyAuthServer\handleNusoapRequest(), and ILIAS\AuthSOAP\SoapDummyAuthServer\isPostRequest().

+ Here is the call graph for this function:

Field Documentation

◆ SERVICE_NAME

const ILIAS\AuthSOAP\SoapDummyAuthServer::SERVICE_NAME = 'ILIAS SOAP Dummy Authentication Server'

Definition at line 25 of file SoapDummyAuthServer.php.

◆ SERVICE_NAMESPACE

const ILIAS\AuthSOAP\SoapDummyAuthServer::SERVICE_NAMESPACE = 'urn:SoapDummyAuthServer'

Definition at line 26 of file SoapDummyAuthServer.php.


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