Skip to content
Snippets Groups Projects
Commit 71cd422a authored by Olav Morken's avatar Olav Morken
Browse files

Make it possible to set a default value for IsPassive in SP-hosted metadata.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@554 44740490-163a-0410-bde0-09ae8108e29a
parent 95b530a5
No related branches found
No related tags found
No related merge requests found
......@@ -247,6 +247,15 @@
set, the SP receives all attributes available at the IdP.</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>IsPassive</glossterm>
<glossdef>
<para>IsPassive allows you to enable passive authentication by
default for this SP.</para>
</glossdef>
</glossentry>
</glosslist>
</section>
......
......@@ -20,7 +20,7 @@ class SimpleSAML_XML_SAML20_AuthnRequest {
private $message = null;
private $dom;
private $relayState = null;
private $isPassive = 'false';
private $isPassive = null;
const PROTOCOL = 'saml2';
......@@ -234,6 +234,25 @@ class SimpleSAML_XML_SAML20_AuthnRequest {
</samlp:RequestedAuthnContext>';
}
/* Check the metadata for isPassive if $this->isPassive === NULL. */
if($this->isPassive === NULL) {
/*
* Process the SAML 2.0 SP hosted metadata parameter: IsPassive
*/
if (isset($md['IsPassive'])) {
if (is_bool($md['IsPassive'])) {
$this->isPassive = ($md['IsPassive'] ? 'true' : 'false');
} else {
throw new Exception('Illegal format of the IsPassive parameter in' .
' the SAML 2.0 SP hosted metadata for entity [' . $spentityid .
']. This value should be set to a PHP boolean value.');
}
} else {
/* The default is off. */
$this->isPassive = 'false';
}
}
/*
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment