Example #1
0
 /**
  * Initialize a SPSSODescriptor.
  *
  * @param \DOMElement|null $xml The XML element we should load.
  */
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('md:SPSSODescriptor', $xml);
     if ($xml === null) {
         return;
     }
     $this->AuthnRequestsSigned = Utils::parseBoolean($xml, 'AuthnRequestsSigned', null);
     $this->WantAssertionsSigned = Utils::parseBoolean($xml, 'WantAssertionsSigned', null);
     foreach (Utils::xpQuery($xml, './saml_metadata:AssertionConsumerService') as $ep) {
         $this->AssertionConsumerService[] = new IndexedEndpointType($ep);
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:AttributeConsumingService') as $acs) {
         $this->AttributeConsumingService[] = new AttributeConsumingService($acs);
     }
 }
Example #2
0
 /**
  * Initialize an IDPSSODescriptor.
  *
  * @param \DOMElement|null $xml The XML element we should load.
  */
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('md:IDPSSODescriptor', $xml);
     if ($xml === null) {
         return;
     }
     $this->WantAuthnRequestsSigned = Utils::parseBoolean($xml, 'WantAuthnRequestsSigned', null);
     foreach (Utils::xpQuery($xml, './saml_metadata:SingleSignOnService') as $ep) {
         $this->SingleSignOnService[] = new EndpointType($ep);
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:NameIDMappingService') as $ep) {
         $this->NameIDMappingService[] = new EndpointType($ep);
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
         $this->AssertionIDRequestService[] = new EndpointType($ep);
     }
     $this->AttributeProfile = Utils::extractStrings($xml, Constants::NS_MD, 'AttributeProfile');
     foreach (Utils::xpQuery($xml, './saml_assertion:Attribute') as $a) {
         $this->Attribute[] = new Attribute($a);
     }
 }