protected function getSamlAssertion($response) {
      $xml = new \DOMDocument();
      $xml->loadXML($response);
      $xpath = new \DOMXPath($xml);

      if ($xpath->query("//*[name()='saml:Assertion']")->length > 0) {
        $nodeToken = $xpath->query("//*[name()='saml:Assertion']");
        if (!empty($nodeToken)) {
          return $nodeToken;
        }
      }
      return NULL;
    }
protected function getSamlAssertion($response) {
      $xml = new \DOMDocument();
      $xml->loadXML($response);
      $xpath = new \DOMXPath($xml);

      if ($xpath->query("//*[name()='saml:Assertion']")->length > 0) {
        $nodeToken = $xpath->query("//*[name()='saml:Assertion']");
        if (!empty($nodeToken)) {
          return $nodeToken;
        }
      }
      return NULL;
    }
protected function getSamlAssertion ( $ response ) { $ xml = new \ DOMDocument ( ) ; $ xml -> loadXML ( $ response ) ; $ xpath = new \ DOMXPath ( $ xml ) ; if ( $ xpath -> query ( "//*[name()='saml:Assertion']" ) -> length > 0 ) { $ nodeToken = $ xpath -> query ( "//*[name()='saml:Assertion']" ) ; if ( ! empty ( $ nodeToken ) ) { return $ nodeToken ; } } return NULL ; }
Get SAML assertion Node so it can be used within the RST2 template
@param $response
@return \DOMNodeList|null
Get SAML assertion Node so it can be used within the RST2 template