Skip to content
Snippets Groups Projects
Commit 575e3d37 authored by Tim van Dijen's avatar Tim van Dijen
Browse files

Fix getters

parent 8d72d7d3
No related branches found
No related tags found
No related merge requests found
...@@ -218,15 +218,15 @@ class Logout ...@@ -218,15 +218,15 @@ class Logout
$lr->setSessionIndex($association['saml:SessionIndex']); $lr->setSessionIndex($association['saml:SessionIndex']);
$lr->setNameId($association['saml:NameID']); $lr->setNameId($association['saml:NameID']);
$assertionLifetime = $spMetadata->getInteger('assertion.lifetime', null); $assertionLifetime = $spMetadata->getOptionalInteger('assertion.lifetime', null);
if ($assertionLifetime === null) { if ($assertionLifetime === null) {
$assertionLifetime = $idpMetadata->getInteger('assertion.lifetime', 300); $assertionLifetime = $idpMetadata->getOptionalInteger('assertion.lifetime', 300);
} }
$lr->setNotOnOrAfter(time() + $assertionLifetime); $lr->setNotOnOrAfter(time() + $assertionLifetime);
$encryptNameId = $spMetadata->getBoolean('nameid.encryption', null); $encryptNameId = $spMetadata->getOptionalBoolean('nameid.encryption', null);
if ($encryptNameId === null) { if ($encryptNameId === null) {
$encryptNameId = $idpMetadata->getBoolean('nameid.encryption', false); $encryptNameId = $idpMetadata->getOptionalBoolean('nameid.encryption', false);
} }
if ($encryptNameId) { if ($encryptNameId) {
$lr->encryptNameId(Message::getEncryptionKey($spMetadata)); $lr->encryptNameId(Message::getEncryptionKey($spMetadata));
...@@ -310,7 +310,7 @@ class Logout ...@@ -310,7 +310,7 @@ class Logout
if (method_exists($sp['Handler'], 'getAssociationConfig')) { if (method_exists($sp['Handler'], 'getAssociationConfig')) {
$assocIdP = IdP::getByState($sp); $assocIdP = IdP::getByState($sp);
$assocConfig = call_user_func([$sp['Handler'], 'getAssociationConfig'], $assocIdP, $sp); $assocConfig = call_user_func([$sp['Handler'], 'getAssociationConfig'], $assocIdP, $sp);
$sp['core:Logout-IFrame:Timeout'] = $assocConfig->getInteger('core:logout-timeout', 5) + time(); $sp['core:Logout-IFrame:Timeout'] = $assocConfig->getOptionalInteger('core:logout-timeout', 5) + time();
} else { } else {
$sp['core:Logout-IFrame:Timeout'] = time() + 5; $sp['core:Logout-IFrame:Timeout'] = time() + 5;
} }
......
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