Skip to content
Snippets Groups Projects
Commit f09ee1fb authored by Olav Morken's avatar Olav Morken
Browse files

Auth_Default: Handle exceptions thrown in the authenticate function.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1573 44740490-163a-0410-bde0-09ae8108e29a
parent 6798d5fd
No related branches found
No related tags found
No related merge requests found
...@@ -62,7 +62,14 @@ class SimpleSAML_Auth_Default { ...@@ -62,7 +62,14 @@ class SimpleSAML_Auth_Default {
throw new Exception('Invalid authentication source: ' . $authId); throw new Exception('Invalid authentication source: ' . $authId);
} }
$as->authenticate($state); try {
$as->authenticate($state);
} catch (SimpleSAML_Error_Exception $e) {
SimpleSAML_Auth_State::throwException($state, $e);
} catch (Exception $e) {
$e = new SimpleSAML_Error_UnserializableException($e);
SimpleSAML_Auth_State::throwException($state, $e);
}
self::loginCompleted($state); self::loginCompleted($state);
} }
......
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