ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Static Public Member Functions | |
static | castKey (XMLSecurityKey $key, $algorithm, $type='public') |
Helper function to convert a XMLSecurityKey to the correct algorithm. More... | |
static | xpQuery (\DOMNode $node, $query) |
Do an XPath query on an XML node. More... | |
static | parseBoolean (\DOMElement $node, $attributeName, $default=null) |
Parse a boolean attribute. More... | |
static | addNameId (\DOMElement $node, array $nameId) |
Create a NameID element. More... | |
static | parseNameId (\DOMElement $xml) |
Parse a NameID element. More... | |
static | insertSignature (XMLSecurityKey $key, array $certificates, \DOMElement $root, \DOMNode $insertBefore=null) |
Insert a Signature-node. More... | |
static | decryptElement (\DOMElement $encryptedData, XMLSecurityKey $inputKey, array $blacklist=array()) |
Decrypt an encrypted element. More... | |
static | extractLocalizedStrings (\DOMElement $parent, $namespaceURI, $localName) |
Extract localized strings from a set of nodes. More... | |
static | extractStrings (\DOMElement $parent, $namespaceURI, $localName) |
Extract strings from a set of nodes. More... | |
static | addString (\DOMElement $parent, $namespace, $name, $value) |
Append string element. More... | |
static | addStrings (\DOMElement $parent, $namespace, $name, $localized, array $values) |
Append string elements. More... | |
static | createKeyDescriptor ($x509Data) |
Create a KeyDescriptor with the given certificate. More... | |
static | xsDateTimeToTimestamp ($time) |
This function converts a SAML2 timestamp on the form yyyy-mm-ddThh:mm:ss(.s+)?Z to a UNIX timestamp. More... | |
static | getContainer () |
|
static |
Create a NameID element.
The NameId array can have the following elements: 'Value', 'Format', 'NameQualifier, 'SPNameQualifier' and 'SPProviderID'.
Only the 'Value'-element is required.
\DOMElement | $node | The DOM node we should append the NameId to. |
array | $nameId | The name identifier. |
Definition at line 314 of file Utils.php.
|
static |
Append string element.
\DOMElement | $parent | The parent element we should append the new nodes to. |
string | $namespace | The namespace of the created element. |
string | $name | The name of the created element. |
string | $value | The value of the element. |
Definition at line 635 of file Utils.php.
References $n, $name, and $namespace.
Referenced by SAML2\XML\ds\KeyName\toXML(), SAML2\XML\ds\X509Certificate\toXML(), SAML2\XML\md\AdditionalMetadataLocation\toXML(), and SAML2\XML\md\ContactPerson\toXML().
|
static |
Append string elements.
\DOMElement | $parent | The parent element we should append the new nodes to. |
string | $namespace | The namespace of the created elements |
string | $name | The name of the created elements |
bool | $localized | Whether the strings are localized, and should include the xml:lang attribute. |
array | $values | The values we should create the elements from. |
Definition at line 659 of file Utils.php.
References $index, $n, $name, and $namespace.
Referenced by SAML2\XML\mdrpi\RegistrationInfo\toXML(), SAML2\XML\mdui\DiscoHints\toXML(), SAML2\XML\md\AuthnAuthorityDescriptor\toXML(), SAML2\XML\md\PDPDescriptor\toXML(), SAML2\XML\mdrpi\PublicationInfo\toXML(), SAML2\XML\md\Organization\toXML(), SAML2\XML\md\SSODescriptorType\toXML(), SAML2\XML\md\AttributeConsumingService\toXML(), SAML2\XML\md\AttributeAuthorityDescriptor\toXML(), SAML2\XML\mdui\UIInfo\toXML(), SAML2\XML\md\IDPSSODescriptor\toXML(), SAML2\XML\md\AffiliationDescriptor\toXML(), and SAML2\XML\md\ContactPerson\toXML().
|
static |
Helper function to convert a XMLSecurityKey to the correct algorithm.
XMLSecurityKey | $key | The key. |
string | $algorithm | The desired algorithm. |
string | $type | Public or private key, defaults to public. |
Definition at line 112 of file Utils.php.
References $algo, $info, $key, $type, and array.
|
static |
|
static |
|
static |
Extract localized strings from a set of nodes.
\DOMElement | $parent | The element that contains the localized strings. |
string | $namespaceURI | The namespace URI the localized strings should have. |
string | $localName | The localName of the localized strings. |
Definition at line 580 of file Utils.php.
Referenced by SAML2\XML\mdrpi\RegistrationInfo\__construct(), SAML2\XML\md\Organization\__construct(), SAML2\XML\mdrpi\PublicationInfo\__construct(), SAML2\XML\md\AttributeConsumingService\__construct(), and SAML2\XML\mdui\UIInfo\__construct().
|
static |
Extract strings from a set of nodes.
\DOMElement | $parent | The element that contains the localized strings. |
string | $namespaceURI | The namespace URI the string elements should have. |
string | $localName | The localName of the string elements. |
Definition at line 610 of file Utils.php.
Referenced by SAML2\XML\md\AuthnAuthorityDescriptor\__construct(), SAML2\XML\md\PDPDescriptor\__construct(), SAML2\XML\mdui\DiscoHints\__construct(), SAML2\XML\md\SSODescriptorType\__construct(), SAML2\XML\md\AttributeAuthorityDescriptor\__construct(), SAML2\XML\md\IDPSSODescriptor\__construct(), and SAML2\XML\md\AffiliationDescriptor\__construct().
|
static |
Definition at line 752 of file Utils.php.
|
static |
Insert a Signature-node.
XMLSecurityKey | $key | The key we should use to sign the message. |
array | $certificates | The certificates we should add to the signature node. |
\DOMElement | $root | The XML node we should sign. |
\DOMNode | $insertBefore | The XML element we should insert the signature element before. |
Definition at line 364 of file Utils.php.
References $certificate, $type, $xml, array, RobRichards\XMLSecLibs\XMLSecurityKey\getAlgorithm(), and RobRichards\XMLSecLibs\XMLSecurityKey\getSymmetricKeySize().
|
static |
Parse a boolean attribute.
\DOMElement | $node | The element we should fetch the attribute from. |
string | $attributeName | The name of the attribute. |
mixed | $default | The value that should be returned if the attribute doesn't exist. |
Definition at line 276 of file Utils.php.
Referenced by SAML2\XML\md\RequestedAttribute\__construct(), SAML2\XML\md\IndexedEndpointType\__construct(), SAML2\XML\shibmd\Scope\__construct(), SAML2\XML\md\SPSSODescriptor\__construct(), SAML2\XML\md\AttributeConsumingService\__construct(), and SAML2\XML\md\IDPSSODescriptor\__construct().
|
static |
Parse a NameID element.
\DOMElement | $xml | The DOM element we should parse. |
Definition at line 343 of file Utils.php.
|
static |
Do an XPath query on an XML node.
\DOMNode | $node | The XML node. |
string | $query | The query. |
Definition at line 191 of file Utils.php.
References $i, $query, $results, $ret, and array.
Referenced by SAML2\XML\mdattr\EntityAttributes\__construct(), SAML2\XML\saml\SubjectConfirmation\__construct(), SAML2\XML\md\KeyDescriptor\__construct(), SAML2\XML\md\AuthnAuthorityDescriptor\__construct(), SAML2\XML\md\PDPDescriptor\__construct(), SAML2\XML\mdui\DiscoHints\__construct(), SAML2\XML\saml\Attribute\__construct(), SAML2\XML\md\SPSSODescriptor\__construct(), SAML2\XML\md\SSODescriptorType\__construct(), SAML2\XML\md\AttributeConsumingService\__construct(), SAML2\XML\md\EntitiesDescriptor\__construct(), SAML2\XML\md\AttributeAuthorityDescriptor\__construct(), SAML2\XML\mdui\UIInfo\__construct(), SAML2\XML\md\IDPSSODescriptor\__construct(), SAML2\XML\md\AffiliationDescriptor\__construct(), SAML2\XML\md\EntityDescriptor\__construct(), SAML2\XML\md\RoleDescriptor\__construct(), SAML2\XML\samlp\Extensions\getList(), SAML2\XML\md\Extensions\getList(), and SAML2\XML\md\ContactPerson\getStringElements().
|
static |
This function converts a SAML2 timestamp on the form yyyy-mm-ddThh:mm:ss(.s+)?Z to a UNIX timestamp.
The sub-second part is ignored.
Andreas comments: I got this timestamp from Shibboleth 1.3 IdP: 2008-01-17T11:28:03.577Z Therefore I added to possibility to have microseconds to the format. Added: (.\d{1,3})? to the regex.
Note that we always require a 'Z' timezone for the dateTime to be valid. This is not in the SAML spec but that's considered to be a bug in the spec. See https://github.com/simplesamlphp/saml2/pull/36 for some background.
string | $time | The time we should convert. |
Definition at line 721 of file Utils.php.
Referenced by SAML2\XML\mdrpi\RegistrationInfo\__construct(), SAML2\XML\mdrpi\PublicationInfo\__construct(), SAML2\XML\md\EntitiesDescriptor\__construct(), SAML2\XML\saml\SubjectConfirmationData\__construct(), SAML2\XML\md\AffiliationDescriptor\__construct(), SAML2\XML\md\EntityDescriptor\__construct(), SAML2\XML\md\RoleDescriptor\__construct(), SimpleSAML_Metadata_SAMLBuilder\addExtensions(), SimpleSAML_Utilities\checkDateConditions(), and SimpleSAML\XML\Shib13\AuthnResponse\checkDateConditions().