summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorJaime Perez Crespo <jaime.perez@uninett.no>2015-08-30 21:33:28 +0200
committerJaime Perez Crespo <jaime.perez@uninett.no>2015-08-30 21:33:28 +0200
commit4e649e055ccb051e74ddfbf7bc439b5a3c457c76 (patch)
treecdefe61be99fcea0c7a1824bbacaaa586d45ee69 /lib
parentcfa28c4a77c3a8f6165f379a78823c848f1e5315 (diff)
downloadsimplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.zip
simplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.tar.gz
simplesamlphp-4e649e055ccb051e74ddfbf7bc439b5a3c457c76.tar.bz2
Throw an exception instead of doing nothing if the auth source specified is invalid. This mimics the old behaviour.
Diffstat (limited to 'lib')
-rw-r--r--lib/SimpleSAML/Auth/Default.php5
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php
index 5dfa1b8..76b7f39 100644
--- a/lib/SimpleSAML/Auth/Default.php
+++ b/lib/SimpleSAML/Auth/Default.php
@@ -21,9 +21,10 @@ class SimpleSAML_Auth_Default {
array $params = array()) {
$as = SimpleSAML_Auth_Source::getById($authId);
- if ($as !== null) {
- $as->initLogin($return, $errorURL, $params);
+ if ($as === null) {
+ throw new Exception('Invalid authentication source: ' . $authId);
}
+ $as->initLogin($return, $errorURL, $params);
}