예제 #1
0
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('ArtifactResponse', $xml);
     if (!is_null($xml)) {
         $status = 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. */
         }
     }
 }
예제 #2
0
파일: Response.php 프로젝트: SysBind/saml2
 /**
  * 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 !== Constants::NS_SAML) {
             continue;
         }
         if ($node->localName === 'Assertion') {
             $this->assertions[] = new Assertion($node);
         } elseif ($node->localName === 'EncryptedAssertion') {
             $this->assertions[] = new EncryptedAssertion($node);
         }
     }
 }
예제 #3
0
 /**
  * Constructor for SAML 2 response messages.
  *
  * @param \DOMElement|null $xml     The input message.
  */
 public function __construct(\DOMElement $xml = null)
 {
     parent::__construct('LogoutResponse', $xml);
     /* No new fields added by LogoutResponse. */
 }