Skip to content
Snippets Groups Projects
Commit 4e649e05 authored by Jaime Perez Crespo's avatar Jaime Perez Crespo
Browse files

Throw an exception instead of doing nothing if the auth source specified is...

Throw an exception instead of doing nothing if the auth source specified is invalid. This mimics the old behaviour.
parent cfa28c4a
No related branches found
No related tags found
No related merge requests found
......@@ -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);
}
......
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