summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2010-07-08 13:18:33 +0000
committerOlav Morken <olav.morken@uninett.no>2010-07-08 13:18:33 +0000
commit4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20 (patch)
tree4d39a271866225107c02f6265d7afc743b8abcd2 /lib/SimpleSAML
parent25dcd1dc86cbefe78c41e61e9a15428a282bc080 (diff)
downloadsimplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.zip
simplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.tar.gz
simplesamlphp-4c10ef35b4ee97cd83d44d8b39eaaf9ea1660a20.tar.bz2
Utilities::getAuthority: Fix misleading error message.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2387 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML')
-rw-r--r--lib/SimpleSAML/Utilities.php10
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Utilities.php b/lib/SimpleSAML/Utilities.php
index ef31974..3657a5f 100644
--- a/lib/SimpleSAML/Utilities.php
+++ b/lib/SimpleSAML/Utilities.php
@@ -2152,8 +2152,14 @@ class SimpleSAML_Utilities {
if (isset($candidates[$idpmetadata['auth']])) {
return $candidates[$idpmetadata['auth']];
}
- throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' .
- var_export($idpmetadata['entityid'], TRUE) . '.');
+ if (strpos($idpmetadata['auth'], '/') !== FALSE) {
+ /* Probably a file. */
+ throw new SimpleSAML_Error_Exception('You need to set \'authority\' in the metadata for ' .
+ var_export($idpmetadata['entityid'], TRUE) . '.');
+ } else {
+ throw new SimpleSAML_Error_Exception('Unknown authsource ' .
+ var_export($idpmetadata['auth'], TRUE) . '.');
+ }
}