Skip to content
Snippets Groups Projects
Commit e1f25feb authored by Andreas Åkre Solberg's avatar Andreas Åkre Solberg
Browse files

Add support for reconstructing XML where XML for an entity is already cached..

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1521 44740490-163a-0410-bde0-09ae8108e29a
parent 770c5287
No related branches found
No related tags found
No related merge requests found
......@@ -16,6 +16,10 @@ $config = array(
'maxCache' => 60*60*24, // 24 hour cache time
'maxDuration' => 60*60*24*5, // Maximum 5 days duration on ValidUntil.
// If base64 encoded for entity is already cached in the entity, should we
// reconstruct the XML or re-use.
'reconstruct' => TRUE,
/* Whether metadata should be signed. */
'sign.enable' => FALSE,
......
......@@ -11,6 +11,8 @@ $metadataSets = array(
$globalConfig = SimpleSAML_Configuration::getInstance();
$aggregatorConfig = SimpleSAML_Configuration::getConfig('aggregator.php');
$reconstruct = $aggregatorConfig->getBoolean('reconstruct', FALSE);
$aggregators = $aggregatorConfig->getArray('aggragators');
if (!array_key_exists('id', $_GET)) {
......@@ -102,7 +104,7 @@ foreach ($entities as $entity => $sets) {
}
}
if (is_string($entityDescriptor)) {
if (is_string($entityDescriptor) && !$reconstruct) {
/* All metadata sets for the entity contain the same entity descriptor. Use that one. */
$tmp = new DOMDocument();
$tmp->loadXML(base64_decode($entityDescriptor));
......
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