diff --git a/templates/default/consent.php b/templates/default/consent.php index 2ad7c0750aae9d4429c22e6c4d2873dc49049537..566b85db5a92ca7392d778983c3b886c918eaab7 100644 --- a/templates/default/consent.php +++ b/templates/default/consent.php @@ -27,6 +27,12 @@ <?php } ?> </form> <form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['noconsent']); ?>" method="GET"> +<?php +if(array_key_exists('sptype', $this->data) && array_key_exists('spentityid', $this->data)) { + echo('<input type="hidden" name="sptype" value="' . htmlspecialchars($this->data['sptype']) . '" />'); + echo('<input type="hidden" name="spentityid" value="' . htmlspecialchars($this->data['spentityid']) . '" />'); +} +?> <input type="submit" id="nobutton" value="<?php echo htmlspecialchars($this->t('no')) ?>" /> </form> <p> diff --git a/www/noconsent.php b/www/noconsent.php index b592d97f8a5d8e2dcb10897e23759abfb37841af..6d6e0a8b525ff6a57f2550bba83180fcdf3ee29d 100644 --- a/www/noconsent.php +++ b/www/noconsent.php @@ -2,11 +2,18 @@ require_once('_include.php'); +if(array_key_exists('sptype', $_GET) && array_key_exists('spentityid', $_GET)) { + $metadata = SimpleSAML_Metadata_MetaDataStorageHandler::getMetadataHandler(); + $spmetadata = $metadata->getMetaData($_GET['spentityid'], $_GET['sptype']); +} else { + $spmetadata = array(); +} /* Load simpleSAMLphp, configuration */ $config = SimpleSAML_Configuration::getInstance(); $session = SimpleSAML_Session::getInstance(); $t = new SimpleSAML_XHTML_Template($config, 'noconsent.php'); +$t->data['spmetadata'] = $spmetadata; $t->show(); ?> \ No newline at end of file diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php index 8fe095a019a65706be68d9612f8aeadeb4c81713..7bed4754ce579f001222d2a8f4594e23d1193bbd 100644 --- a/www/saml2/idp/SSOService.php +++ b/www/saml2/idp/SSOService.php @@ -276,6 +276,7 @@ if($needAuth && !$isPassive) { $t->data['header'] = 'Consent'; $t->data['sp_name'] = $sp_name; $t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid); + $t->data['sptype'] = 'saml20-sp-remote'; $t->data['spentityid'] = $spentityid; $t->data['spmetadata'] = $spmetadata; $t->data['attributes'] = $filteredattributes; diff --git a/www/shib13/idp/SSOService.php b/www/shib13/idp/SSOService.php index 3744e5144eddb9e936a62cce7f5b5d1a88280ded..41ad67436151b0cbc79d32b226e7239b7afffb7d 100644 --- a/www/shib13/idp/SSOService.php +++ b/www/shib13/idp/SSOService.php @@ -188,6 +188,7 @@ if (!$session->isAuthenticated($authority) ) { $t->data['header'] = 'Consent'; $t->data['sp_name'] = $sp_name; $t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid); + $t->data['sptype'] = 'shib13-sp-remote'; $t->data['spentityid'] = $spentityid; $t->data['spmetadata'] = $spmetadata; $t->data['attributes'] = $filteredattributes;