/**
  * Initialize a SecurityTokenServiceType element.
  *
  * @param DOMElement|NULL $xml  The XML element we should load.
  */
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('RoleDescriptor', $xml);
     if ($xml === NULL) {
         return;
     }
 }
示例#2
0
 /**
  * Initialize an IDPSSODescriptor.
  *
  * @param DOMElement|NULL $xml The XML element we should load.
  * @throws Exception
  */
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('md:PDPDescriptor', $xml);
     if ($xml === NULL) {
         return;
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AuthzService') as $ep) {
         $this->AuthzService[] = new SAML2_XML_md_EndpointType($ep);
     }
     if (empty($this->AuthzService)) {
         throw new Exception('Must have at least one AuthzService in PDPDescriptor.');
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
         $this->AssertionIDRequestService[] = new SAML2_XML_md_EndpointType($ep);
     }
     $this->NameIDFormat = SAML2_Utils::extractStrings($xml, SAML2_Const::NS_MD, 'NameIDFormat');
 }
 /**
  * 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 (SAML2_Utils::xpQuery($xml, './saml_metadata:ArtifactResolutionService') as $ep) {
         $this->ArtifactResolutionService[] = new SAML2_XML_md_IndexedEndpointType($ep);
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:SingleLogoutService') as $ep) {
         $this->SingleLogoutService[] = new SAML2_XML_md_EndpointType($ep);
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:ManageNameIDService') as $ep) {
         $this->ManageNameIDService[] = new SAML2_XML_md_EndpointType($ep);
     }
     $this->NameIDFormat = SAML2_Utils::extractStrings($xml, SAML2_Const::NS_MD, 'NameIDFormat');
 }
 /**
  * Initialize an IDPSSODescriptor.
  *
  * @param DOMElement|NULL $xml  The XML element we should load.
  */
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('md:AttributeAuthorityDescriptor', $xml);
     if ($xml === NULL) {
         return;
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AttributeService') as $ep) {
         $this->AttributeService[] = new SAML2_XML_md_EndpointType($ep);
     }
     if (empty($this->AttributeService)) {
         throw new Exception('Must have at least one AttributeService in AttributeAuthorityDescriptor.');
     }
     foreach (SAML2_Utils::xpQuery($xml, './saml_metadata:AssertionIDRequestService') as $ep) {
         $this->AssertionIDRequestService[] = new SAML2_XML_md_EndpointType($airs);
     }
     $this->NameIDFormat = SAML2_Utils::extractStrings($xml, './saml_metadata:NameIDFormat');
     $this->AttributeProfile = SAML2_Utils::extractStrings($xml, './saml_metadata:AttributeProfile');
     foreach (SAML2_Utils::xpQuery($xml, './saml_assertion:Attribute') as $a) {
         $this->Attribute[] = new SAML2_XML_saml_Attribute($a);
     }
 }
示例#5
0
 /**
  * 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 SAML2_XML_Chunk($xml);
 }
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('md:RoleDescriptor', $xml);
 }