From 9aab9c816fa6421497f7397ba0e5b6874c2c74a9 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Thu, 8 Jan 2009 13:12:04 +0000
Subject: [PATCH] Set SP session active after auth processing is completed...

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1096 44740490-163a-0410-bde0-09ae8108e29a
---
 www/saml2/idp/SSOService.php | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php
index f7657cd31..b145aa0d0 100644
--- a/www/saml2/idp/SSOService.php
+++ b/www/saml2/idp/SSOService.php
@@ -243,10 +243,6 @@ if($needAuth && !$isPassive) {
 		$spmetadata = $metadata->getMetaData($spentityid, 'saml20-sp-remote');
 		
 		$sp_name = (isset($spmetadata['name']) ? $spmetadata['name'] : $spentityid);
-	
-		// Adding this service provider to the list of sessions.
-		// Right now the list is used for SAML 2.0 only.
-		$session->add_sp_session($spentityid);
 
 		SimpleSAML_Logger::info('SAML2.0 - IdP.SSOService: Sending back AuthnResponse to ' . $spentityid);
 		
@@ -380,6 +376,11 @@ if($needAuth && !$isPassive) {
 		
 		
 		
+		// Adding this service provider to the list of sessions.
+		// Right now the list is used for SAML 2.0 only.
+		$session->add_sp_session($spentityid);
+		
+		
 		// Generate an SAML 2.0 AuthNResponse message
 		$ar = new SimpleSAML_XML_SAML20_AuthnResponse($config, $metadata);
 		$authnResponseXML = $ar->generate($idpentityid, $spentityid, $requestcache['RequestID'], null, $filteredattributes);
-- 
GitLab