public function MetadataReader::__construct in SAML SP 2.0 Single Sign On (SSO) - SAML Service Provider 8
File
- src/
MetadataReader.php, line 8
Class
Namespace
Drupal\miniorange_samlCode
public function __construct(\DOMNode $xml = NULL) {
$this->identityProviders = array();
$this->serviceProviders = array();
$entityDescriptors = Utilities::xpQuery($xml, './saml_metadata:EntityDescriptor');
foreach ($entityDescriptors as $entityDescriptor) {
$idpSSODescriptor = Utilities::xpQuery($entityDescriptor, './saml_metadata:IDPSSODescriptor');
if (isset($idpSSODescriptor) && !empty($idpSSODescriptor)) {
array_push($this->identityProviders, new IdentityProviders($entityDescriptor));
}
//TODO: add sp descriptor
}
}