diff --git a/templates/default/logout-iframe.php b/templates/default/logout-iframe.php index 35cdda2ac96978c923a278f9ab0fbc25ae6c3a82..752dba3b998ca6f40bdf6f4d402df3cc87ab0455 100644 --- a/templates/default/logout-iframe.php +++ b/templates/default/logout-iframe.php @@ -24,21 +24,21 @@ for (j=1; j<=10; j++) { <p>You have initiated a <strong>global logout</strong> from the service <strong><?php echo $this->data['requesterName']; ?></strong>. Global logout means you will be logged out from all services connected to this identity provider. This page will show the status of the logout proccess for all of the services you are logged into.</p> - - - <?php + + foreach ($this->data['sparray'] AS $sp) { echo '<iframe class="hiddeniframe" style="border: 1px solid #888; width: 80%; height: 100px" src="' . $sp['url'] . '" ></iframe>'; } foreach ($this->data['sparray'] AS $spentityid => $sp) { + + $spname = is_array($sp['name']) ? $this->getTranslation($sp['name']) : $sp['name']; echo '<div class="inprogress" id="' . $spentityid . '"> - <img style="float: left; margin: 3px" src="/' . $this->data['baseurlpath'] . 'resources/progress.gif" />Wait... is logging out from <strong>' . $sp['name'] . '</strong></div>'; + <img style="float: left; margin: 3px" src="/' . $this->data['baseurlpath'] . 'resources/progress.gif" />Wait... is logging out from <strong>' . $spname . '</strong></div>'; } - ?> <div id="interrupt">[ <a href="<?php echo $this->data['logoutresponse']; ?>">Interrupt logging out and go back to service</a> ]</div> @@ -49,8 +49,5 @@ for (j=1; j<=10; j++) { <br />[ <a href="<?php echo $this->data['logoutresponse']; ?>">OK, continue back to <?php echo $this->data['requesterName']; ?> to complete the logout process.</a> ] </div> </div> - - - <?php $this->includeAtTemplateBase('includes/footer.php'); ?> \ No newline at end of file diff --git a/www/resources/default.css b/www/resources/default.css index 88dcf6f3658dfc86b3c60082fa3d5451b73562b0..5f1cc4a6b5ffb9ab027be60df6b9ca0037bf6e57 100644 --- a/www/resources/default.css +++ b/www/resources/default.css @@ -273,14 +273,14 @@ div#interrupt { border: 3px solid #036; background: #39F; padding: 1em; - margin: 1em; + margin: .2em; } div#iscompleted { display: none; border: 3px solid #993; background: #FF9; padding: 1em; - margin: 1em; + margin: .2em; } div.allcompleted#iscompleted { display: block ! important; @@ -289,8 +289,8 @@ div.inprogress, div.loggedout { background: #eee; color: #444; - padding: 1em; - margin: 1em; + padding: .2em 1em; + margin: .2em; } div.inprogress { border: 1px dotted #888; diff --git a/www/saml2/idp/SingleLogoutServiceiFrame.php b/www/saml2/idp/SingleLogoutServiceiFrame.php index 03a2002669da472d93876b728cf736f628d91c66..06343ebef488d7a9c066300d76e7dea7964b847e 100644 --- a/www/saml2/idp/SingleLogoutServiceiFrame.php +++ b/www/saml2/idp/SingleLogoutServiceiFrame.php @@ -100,6 +100,9 @@ function updateslostatus() { $listofsps = $session->get_sp_list(SimpleSAML_Session::STATE_LOGGEDOUT); + // Using template object to be able to translate name of service provider. + $t = new SimpleSAML_XHTML_Template($config, 'logout-iframe.php'); + // Instantiate the xajaxResponse object $objResponse = new xajaxResponse(); @@ -111,10 +114,11 @@ function updateslostatus() { $spmetadata = $metadata->getMetaData($spentityid, 'saml20-sp-remote'); $name = array_key_exists('name', $spmetadata) ? $spmetadata['name'] : $spentityid; - + + $spname = is_array($name) ? $t->getTranslation($name) : $name; $objResponse->addAssign($spentityid, "className", 'loggedout'); - $objResponse->addAssign($spentityid, "innerHTML", 'Logging out from <strong>' . $name . '</strong> successfully completed'); + $objResponse->addAssign($spentityid, "innerHTML", 'Logging out from <strong>' . $spname . '</strong> successfully completed'); } diff --git a/www/saml2/idp/SingleLogoutServiceiFrameResponse.php b/www/saml2/idp/SingleLogoutServiceiFrameResponse.php index ec9b18038485945bb618270570ca8ba8df38f50c..c9157aefb8a5922835c736238e1ddad767ec38ad 100644 --- a/www/saml2/idp/SingleLogoutServiceiFrameResponse.php +++ b/www/saml2/idp/SingleLogoutServiceiFrameResponse.php @@ -13,7 +13,7 @@ require_once('../../_include.php'); -sleep(rand(1,6)); +sleep(max(0, rand(-3,5)));