/**
  * Initialize an IDPSSODescriptor.
  *
  * @param \DOMElement|null $xml The XML element we should load.
  * @throws \Exception
  */
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('md:AuthnAuthorityDescriptor', $xml);
     if ($xml === null) {
         return;
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:AuthnQueryService') as $ep) {
         $this->AuthnQueryService[] = new EndpointType($ep);
     }
     if (empty($this->AuthnQueryService)) {
         throw new \Exception('Must have at least one AuthnQueryService in AuthnAuthorityDescriptor.');
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
         $this->AssertionIDRequestService[] = new EndpointType($ep);
     }
     $this->NameIDFormat = Utils::extractStrings($xml, Constants::NS_MD, 'NameIDFormat');
 }
Exemple #2
0
 /**
  * Initialize a SSODescriptor.
  *
  * @param string          $elementName The name of this element.
  * @param \DOMElement|null $xml         The XML element we should load.
  */
 protected function __construct($elementName, \DOMElement $xml = null)
 {
     assert('is_string($elementName)');
     parent::__construct($elementName, $xml);
     if ($xml === null) {
         return;
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:ArtifactResolutionService') as $ep) {
         $this->ArtifactResolutionService[] = new IndexedEndpointType($ep);
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:SingleLogoutService') as $ep) {
         $this->SingleLogoutService[] = new EndpointType($ep);
     }
     foreach (Utils::xpQuery($xml, './saml_metadata:ManageNameIDService') as $ep) {
         $this->ManageNameIDService[] = new EndpointType($ep);
     }
     $this->NameIDFormat = Utils::extractStrings($xml, Constants::NS_MD, 'NameIDFormat');
 }
Exemple #3
0
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('md:RoleDescriptor', $xml);
 }
 /**
  * Initialize an unknown RoleDescriptor.
  *
  * @param \DOMElement $xml The XML element we should load.
  */
 public function __construct(\DOMElement $xml)
 {
     parent::__construct('md:RoleDescriptor', $xml);
     $this->xml = new Chunk($xml);
 }