◆ __construct()
◆ addErrors()
ilSamlIdpXmlMetadataParser::addErrors |
( |
| ) |
|
|
private |
◆ beginLogging()
ilSamlIdpXmlMetadataParser::beginLogging |
( |
| ) |
|
|
private |
◆ endLogging()
ilSamlIdpXmlMetadataParser::endLogging |
( |
| ) |
|
|
private |
- Returns
- LibXMLError[] An array with the LibXMLErrors which has occurred since beginLogging() was called.
Definition at line 60 of file class.ilSamlIdpXmlMetadataParser.php.
References addErrors().
Referenced by ok().
64 $errors = array_pop($this->errorStack);
66 if ([] === $this->errorStack) {
67 libxml_use_internal_errors($this->xmlErrorState);
◆ error()
ilSamlIdpXmlMetadataParser::error |
( |
|
$additional_errors = [] | ) |
|
|
private |
- Parameters
-
list<LibXMLError> | $additional_errors |
Definition at line 118 of file class.ilSamlIdpXmlMetadataParser.php.
Referenced by parse().
120 return $this->dataFactory->error($this->errorFormatter->formatErrors(...$this->endLogging(), ...$additional_errors));
◆ ok()
ilSamlIdpXmlMetadataParser::ok |
( |
string |
$entity_id | ) |
|
|
private |
◆ parse()
ilSamlIdpXmlMetadataParser::parse |
( |
string |
$xmlString | ) |
|
- Returns
- Result<non-empty-string>
Definition at line 76 of file class.ilSamlIdpXmlMetadataParser.php.
References beginLogging(), error(), null, and ok().
83 $xml->registerXPathNamespace(
'md',
'urn:oasis:names:tc:SAML:2.0:metadata');
84 $xml->registerXPathNamespace(
'mdui',
'urn:oasis:names:tc:SAML:metadata:ui');
86 $idps = $xml->xpath(
'//md:EntityDescriptor[//md:IDPSSODescriptor]');
88 $entity_id = ($idps[0] ??
null)?->attributes(
'',
true)[
'entityID'][0] ??
'';
89 $entity_id = (string) $entity_id;
91 if ($entity_id !==
'') {
92 return $this->
ok($entity_id);
96 $error->level = LIBXML_ERR_FATAL;
98 $error->message =
'No entityID found';
102 return $this->
error([$error]);
104 return $this->
error();
while($session_entry=$r->fetchRow(ilDBConstants::FETCHMODE_ASSOC)) return null
◆ $errorStack
array ilSamlIdpXmlMetadataParser::$errorStack = [] |
|
private |
◆ $xmlErrorState
bool ilSamlIdpXmlMetadataParser::$xmlErrorState = false |
|
private |
The documentation for this class was generated from the following file: