From 1751e2312ce447cfd36e0f5a0f185811b70e2c3c Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Thu, 5 Nov 2009 06:33:59 +0000
Subject: [PATCH] Auth_Default: Make it possible to set the current IdP from
 authentication sources.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1955 44740490-163a-0410-bde0-09ae8108e29a
---
 lib/SimpleSAML/Auth/Default.php | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/lib/SimpleSAML/Auth/Default.php b/lib/SimpleSAML/Auth/Default.php
index 18df3b49e..ca4221db8 100644
--- a/lib/SimpleSAML/Auth/Default.php
+++ b/lib/SimpleSAML/Auth/Default.php
@@ -100,6 +100,12 @@ class SimpleSAML_Auth_Default {
 			$session->setLogoutState($state['LogoutState']);
 		}
 
+		if (array_key_exists('IdP', $state)) {
+			$session->setIdP($state['IdP']);
+		} else {
+			$session->setIdP(NULL);
+		}
+
 		/* Redirect... */
 		SimpleSAML_Utilities::redirect($returnURL);
 	}
-- 
GitLab