summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2008-09-15 09:45:49 +0000
committerOlav Morken <olav.morken@uninett.no>2008-09-15 09:45:49 +0000
commitbbfb2e9e30b1d5f21c82a8fd7342605ea87d455d (patch)
tree1849c5ef4b6365f55588cad6c73d8fdd5004d060 /lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php
parent631cb72078d874a38ecdce9c1dfc9cc714c10511 (diff)
downloadsimplesamlphp-bbfb2e9e30b1d5f21c82a8fd7342605ea87d455d.zip
simplesamlphp-bbfb2e9e30b1d5f21c82a8fd7342605ea87d455d.tar.gz
simplesamlphp-bbfb2e9e30b1d5f21c82a8fd7342605ea87d455d.tar.bz2
Dynamic metadata - remove fallback for entity selection when no entity with correct entity id is found in downloaded metadata.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@870 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php')
-rw-r--r--lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php30
1 files changed, 9 insertions, 21 deletions
diff --git a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php
index 7404de9..784f734 100644
--- a/lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php
+++ b/lib/SimpleSAML/Metadata/MetaDataStorageHandlerDynamicXML.php
@@ -239,27 +239,15 @@ class SimpleSAML_Metadata_MetaDataStorageHandlerDynamicXML extends SimpleSAML_Me
throw new Exception('No entities found in "' . $index . '".');
}
- if (array_key_exists($index, $entities)) {
- $entity = $entities[$index];
- $data = self::getParsedSet($entity, $set);
- if ($data === NULL) {
- throw new Exception('No metadata for set "' . $set .
- '" available from "' . $index . '".');
- }
- } else {
- SimpleSAML_Logger::warning('MetaData - Handler.DynamicXML: No entity with correct' .
- ' entity id found. Using the first entity which defines the correct' .
- ' metadata.');
- foreach ($entities as $entity) {
- $data = self::getParsedSet($entity, $set);
- if ($data !== NULL) {
- break;
- }
- }
- if ($data === NULL) {
- throw new Exception('No entities defines metadata for set "' .
- $set . '" in "' . $index . '".');
- }
+ if (!array_key_exists($index, $entities)) {
+ throw new Exception ('No entity with correct entity id found in "' . $index . '".');
+ }
+
+ $entity = $entities[$index];
+ $data = self::getParsedSet($entity, $set);
+ if ($data === NULL) {
+ throw new Exception('No metadata for set "' . $set .
+ '" available from "' . $index . '".');
}
$this->writeToCache($set, $index, $data);