From 6798d5fd688af3ead93c3b591d738c9ce166a4b2 Mon Sep 17 00:00:00 2001 From: Olav Morken <olav.morken@uninett.no> Date: Mon, 13 Jul 2009 06:17:54 +0000 Subject: [PATCH] Auth_Default: Add support for exception handling. This function makes SimpleSAML_Auth_Default save the errorURL given to the login functionin the state array. This will make the SimpleSAML_Auth_State class pass exceptions to this url. git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1572 44740490-163a-0410-bde0-09ae8108e29a --- lib/SimpleSAML/Auth/Default.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php index b4445fb05..5b60c90dc 100644 --- a/lib/SimpleSAML/Auth/Default.php +++ b/lib/SimpleSAML/Auth/Default.php @@ -53,6 +53,10 @@ class SimpleSAML_Auth_Default { $state[SimpleSAML_Auth_State::RESTART] = $hints[SimpleSAML_Auth_State::RESTART]; } + if ($errorURL !== NULL) { + $state[SimpleSAML_Auth_State::EXCEPTION_HANDLER_URL] = $errorURL; + } + $as = SimpleSAML_Auth_Source::getById($authId); if ($as === NULL) { throw new Exception('Invalid authentication source: ' . $authId); -- GitLab