Esempio n. 1
0
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('ArtifactResponse', $xml);
     if (!is_null($xml)) {
         $status = SAML2_Utils::xpQuery($xml, './saml_protocol:Status');
         assert('!empty($status)');
         /* Will have failed during StatusResponse parsing. */
         $status = $status[0];
         for ($any = $status->nextSibling; $any !== NULL; $any = $any->nextSibling) {
             if ($any instanceof DOMElement) {
                 $this->any = $any;
                 break;
             }
             /* Ignore comments and text nodes. */
         }
     }
 }
Esempio n. 2
0
 /**
  * Constructor for SAML 2 response messages.
  *
  * @param DOMElement|NULL $xml The input message.
  */
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('Response', $xml);
     $this->assertions = array();
     if ($xml === NULL) {
         return;
     }
     for ($node = $xml->firstChild; $node !== NULL; $node = $node->nextSibling) {
         if ($node->namespaceURI !== SAML2_Const::NS_SAML) {
             continue;
         }
         if ($node->localName === 'Assertion') {
             $this->assertions[] = new SAML2_Assertion($node);
         } elseif ($node->localName === 'EncryptedAssertion') {
             $this->assertions[] = new SAML2_EncryptedAssertion($node);
         }
     }
 }
Esempio n. 3
0
 /**
  * Constructor for SAML 2 response messages.
  *
  * @param string $tagName  The tag name of the root element.
  * @param DOMElement|NULL $xml  The input message.
  */
 public function __construct(DOMElement $xml = NULL)
 {
     parent::__construct('LogoutResponse', $xml);
     /* No new fields added by LogoutResponse. */
 }