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

Consent: Include SP metadata in noconsent error page.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@796 44740490-163a-0410-bde0-09ae8108e29a
parent 426655a9
No related branches found
No related tags found
No related merge requests found
...@@ -27,6 +27,12 @@ ...@@ -27,6 +27,12 @@
<?php } ?> <?php } ?>
</form> </form>
<form style="display: inline; margin-left: .5em;" action="<?php echo htmlspecialchars($this->data['noconsent']); ?>" method="GET"> <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')) ?>" /> <input type="submit" id="nobutton" value="<?php echo htmlspecialchars($this->t('no')) ?>" />
</form> </form>
<p> <p>
......
...@@ -2,11 +2,18 @@ ...@@ -2,11 +2,18 @@
require_once('_include.php'); 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 */ /* Load simpleSAMLphp, configuration */
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
$session = SimpleSAML_Session::getInstance(); $session = SimpleSAML_Session::getInstance();
$t = new SimpleSAML_XHTML_Template($config, 'noconsent.php'); $t = new SimpleSAML_XHTML_Template($config, 'noconsent.php');
$t->data['spmetadata'] = $spmetadata;
$t->show(); $t->show();
?> ?>
\ No newline at end of file
...@@ -276,6 +276,7 @@ if($needAuth && !$isPassive) { ...@@ -276,6 +276,7 @@ if($needAuth && !$isPassive) {
$t->data['header'] = 'Consent'; $t->data['header'] = 'Consent';
$t->data['sp_name'] = $sp_name; $t->data['sp_name'] = $sp_name;
$t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid); $t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid);
$t->data['sptype'] = 'saml20-sp-remote';
$t->data['spentityid'] = $spentityid; $t->data['spentityid'] = $spentityid;
$t->data['spmetadata'] = $spmetadata; $t->data['spmetadata'] = $spmetadata;
$t->data['attributes'] = $filteredattributes; $t->data['attributes'] = $filteredattributes;
......
...@@ -188,6 +188,7 @@ if (!$session->isAuthenticated($authority) ) { ...@@ -188,6 +188,7 @@ if (!$session->isAuthenticated($authority) ) {
$t->data['header'] = 'Consent'; $t->data['header'] = 'Consent';
$t->data['sp_name'] = $sp_name; $t->data['sp_name'] = $sp_name;
$t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid); $t->data['idp_name'] = (isset($idpmetadata['name']) ? $idpmetadata['name'] : $idpentityid);
$t->data['sptype'] = 'shib13-sp-remote';
$t->data['spentityid'] = $spentityid; $t->data['spentityid'] = $spentityid;
$t->data['spmetadata'] = $spmetadata; $t->data['spmetadata'] = $spmetadata;
$t->data['attributes'] = $filteredattributes; $t->data['attributes'] = $filteredattributes;
......
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