summaryrefslogtreecommitdiffstats
path: root/lib/SimpleSAML/Auth/Source.php
diff options
context:
space:
mode:
authorOlav Morken <olav.morken@uninett.no>2011-05-24 08:04:15 +0000
committerOlav Morken <olav.morken@uninett.no>2011-05-24 08:04:15 +0000
commitc8be6c60e7ad3ac98f4d53a5a9a34a376d592b9e (patch)
treebb9ccac0cb928a56f509e232882d5f743538b8d9 /lib/SimpleSAML/Auth/Source.php
parent7c35d8e11cf6d3b5ebcc4847c4bd636ab9dae44f (diff)
downloadsimplesamlphp-c8be6c60e7ad3ac98f4d53a5a9a34a376d592b9e.zip
simplesamlphp-c8be6c60e7ad3ac98f4d53a5a9a34a376d592b9e.tar.gz
simplesamlphp-c8be6c60e7ad3ac98f4d53a5a9a34a376d592b9e.tar.bz2
Add reauthentication infrastructure.
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2847 44740490-163a-0410-bde0-09ae8108e29a
Diffstat (limited to 'lib/SimpleSAML/Auth/Source.php')
-rw-r--r--lib/SimpleSAML/Auth/Source.php20
1 files changed, 20 insertions, 0 deletions
diff --git a/lib/SimpleSAML/Auth/Source.php b/lib/SimpleSAML/Auth/Source.php
index d42d3ee..358cd17 100644
--- a/lib/SimpleSAML/Auth/Source.php
+++ b/lib/SimpleSAML/Auth/Source.php
@@ -100,6 +100,26 @@ abstract class SimpleSAML_Auth_Source {
/**
+ * Reauthenticate an user.
+ *
+ * This function is called by the IdP to give the authentication source a chance to
+ * interact with the user even in the case when the user is already authenticated.
+ *
+ * @param array &$state Information about the current authentication.
+ */
+ public function reauthenticate(array &$state) {
+ assert('isset($state["ReturnCallback"])');
+
+ /* The default implementation just copies over the previous authentication data. */
+ $session = SimpleSAML_Session::getInstance();
+ $data = $session->getAuthState($this->authId);
+ foreach ($data as $k => $v) {
+ $state[$k] = $v;
+ }
+ }
+
+
+ /**
* Complete authentication.
*
* This function should be called if authentication has completed. It will never return,