protected function parseRequestedAuthnContext(\DOMElement $xml) { $requestedAuthnContext = Utils::xpQuery($xml, './saml_protocol:RequestedAuthnContext'); if (empty($requestedAuthnContext)) { return; } $requestedAuthnContext = $requestedAuthnContext[0]; $rac = array('AuthnContextClassRef' => array(), 'Comparison' => Constants::COMPARISON_EXACT); $accr = Utils::xpQuery($requestedAuthnContext, './saml_assertion:AuthnContextClassRef'); foreach ($accr as $i) { $rac['AuthnContextClassRef'][] = trim($i->textContent); } if ($requestedAuthnContext->hasAttribute('Comparison')) { $rac['Comparison'] = $requestedAuthnContext->getAttribute('Comparison'); } $this->requestedAuthnContext = $rac; }