ILIAS  trunk Revision v12.0_alpha-1613-gae4c99ebb18
ILIAS\AuthSOAP\SoapDummyAuthHandler Class Reference

@phpstan-type ValidationResult array{firstname: string, lastname: string, email: string, valid: bool} @phpstan-type SessionParameters array{ext_uid: string, soap_pw: string, new_user: bool} @phpstan-type SoapCallArgument string|bool|int|float|object|array<int|string, string|bool|int|float|object> @phpstan-type SoapCallArguments list<SoapCallArgument> @phpstan-type NormalizedParameterInput array<int|string, SoapCallArgument> More...

+ Collaboration diagram for ILIAS\AuthSOAP\SoapDummyAuthHandler:

Public Member Functions

 isValidSession (string $ext_uid, string $soap_pw, bool $new_user)
 
 __soapCall (string $function_name, array $arguments)
 

Private Member Functions

 localOperationName (string $name)
 
 normalizeParameterKeys (array $arguments)
 
 buildValidationResult (string $ext_uid, string $soap_pw, bool $new_user)
 

Detailed Description

@phpstan-type ValidationResult array{firstname: string, lastname: string, email: string, valid: bool} @phpstan-type SessionParameters array{ext_uid: string, soap_pw: string, new_user: bool} @phpstan-type SoapCallArgument string|bool|int|float|object|array<int|string, string|bool|int|float|object> @phpstan-type SoapCallArguments list<SoapCallArgument> @phpstan-type NormalizedParameterInput array<int|string, SoapCallArgument>

Definition at line 30 of file SoapDummyAuthHandler.php.

Member Function Documentation

◆ __soapCall()

ILIAS\AuthSOAP\SoapDummyAuthHandler::__soapCall ( string  $function_name,
array  $arguments 
)
Parameters
SoapCallArguments$arguments
Returns
ValidationResult

Definition at line 44 of file SoapDummyAuthHandler.php.

44 : array
45 {
46 if ($this->localOperationName($function_name) !== 'isValidSession') {
47 throw new \SoapFault('SOAP-ENV:Server', "Procedure '$function_name' not present");
48 }
49
50 return $this->invokeIsValidSession($arguments);
51 }

References ILIAS\AuthSOAP\SoapDummyAuthHandler\localOperationName().

+ Here is the call graph for this function:

◆ buildValidationResult()

ILIAS\AuthSOAP\SoapDummyAuthHandler::buildValidationResult ( string  $ext_uid,
string  $soap_pw,
bool  $new_user 
)
private
Returns
ValidationResult

Definition at line 120 of file SoapDummyAuthHandler.php.

120 : array
121 {
122 $result = [
123 'firstname' => '',
124 'lastname' => '',
125 'email' => '',
126 'valid' => $ext_uid === $soap_pw,
127 ];
128
129 if ($new_user) {
130 $result['firstname'] = 'first ' . $ext_uid;
131 $result['lastname'] = 'last ' . $ext_uid;
132 $result['email'] = $ext_uid . '@de.de';
133 }
134
135 return $result;
136 }
$soap_pw
$ext_uid
$new_user

References $ext_uid, $new_user, and $soap_pw.

Referenced by ILIAS\AuthSOAP\SoapDummyAuthHandler\isValidSession().

+ Here is the caller graph for this function:

◆ isValidSession()

ILIAS\AuthSOAP\SoapDummyAuthHandler::isValidSession ( string  $ext_uid,
string  $soap_pw,
bool  $new_user 
)
Returns
ValidationResult

Definition at line 35 of file SoapDummyAuthHandler.php.

35 : array
36 {
38 }
buildValidationResult(string $ext_uid, string $soap_pw, bool $new_user)

References $new_user, $soap_pw, and ILIAS\AuthSOAP\SoapDummyAuthHandler\buildValidationResult().

+ Here is the call graph for this function:

◆ localOperationName()

ILIAS\AuthSOAP\SoapDummyAuthHandler::localOperationName ( string  $name)
private

Definition at line 53 of file SoapDummyAuthHandler.php.

53 : string
54 {
55 if (str_contains($name, ':')) {
56 return substr($name, strrpos($name, ':') + 1);
57 }
58
59 return $name;
60 }

Referenced by ILIAS\AuthSOAP\SoapDummyAuthHandler\__soapCall(), and ILIAS\AuthSOAP\SoapDummyAuthHandler\normalizeParameterKeys().

+ Here is the caller graph for this function:

◆ normalizeParameterKeys()

ILIAS\AuthSOAP\SoapDummyAuthHandler::normalizeParameterKeys ( array  $arguments)
private
Parameters
NormalizedParameterInput$arguments
Returns
SessionParameters

Definition at line 92 of file SoapDummyAuthHandler.php.

92 : array
93 {
94 $normalized = [];
95 foreach ($arguments as $key => $value) {
96 if (!\is_string($key)) {
97 continue;
98 }
99 $normalized[$this->localOperationName($key)] = $value;
100 }
101
102 if ($normalized !== []) {
103 return [
104 'ext_uid' => (string) ($normalized['ext_uid'] ?? ''),
105 'soap_pw' => (string) ($normalized['soap_pw'] ?? ''),
106 'new_user' => (bool) ($normalized['new_user'] ?? false),
107 ];
108 }
109
110 return [
111 'ext_uid' => (string) ($arguments[0] ?? ''),
112 'soap_pw' => (string) ($arguments[1] ?? ''),
113 'new_user' => (bool) ($arguments[2] ?? false),
114 ];
115 }

References ILIAS\AuthSOAP\SoapDummyAuthHandler\localOperationName().

+ Here is the call graph for this function:

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