public function __construct(\DOMElement $xml = null)
{
parent::__construct('AuthnRequest', $xml);
$this->nameIdPolicy = array();
$this->forceAuthn = false;
$this->isPassive = false;
if ($xml === null) {
return;
}
$this->forceAuthn = Utils::parseBoolean($xml, 'ForceAuthn', false);
$this->isPassive = Utils::parseBoolean($xml, 'IsPassive', false);
if ($xml->hasAttribute('AssertionConsumerServiceURL')) {
$this->assertionConsumerServiceURL = $xml->getAttribute('AssertionConsumerServiceURL');
}
if ($xml->hasAttribute('ProtocolBinding')) {
$this->protocolBinding = $xml->getAttribute('ProtocolBinding');
}
if ($xml->hasAttribute('AttributeConsumingServiceIndex')) {
$this->attributeConsumingServiceIndex = (int) $xml->getAttribute('AttributeConsumingServiceIndex');
}
if ($xml->hasAttribute('AssertionConsumerServiceIndex')) {
$this->assertionConsumerServiceIndex = (int) $xml->getAttribute('AssertionConsumerServiceIndex');
}
$this->parseSubject($xml);
$this->parseNameIdPolicy($xml);
$this->parseRequestedAuthnContext($xml);
$this->parseScoping($xml);
}