From 04493e6ebae7782076ea859a2c01766d2fe019a8 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Andreas=20=C3=85kre=20Solberg?= <andreas.solberg@uninett.no>
Date: Thu, 14 Feb 2008 04:42:57 +0000
Subject: [PATCH] Adding per idp attribute map at idp

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

diff --git a/www/saml2/idp/SSOService.php b/www/saml2/idp/SSOService.php
index 7293f69d7..15db34797 100644
--- a/www/saml2/idp/SSOService.php
+++ b/www/saml2/idp/SSOService.php
@@ -181,7 +181,9 @@ if (!isset($session) || !$session->isValid($authority) ) {
 		 */
 		$ar = new SimpleSAML_XML_SAML20_AuthnResponse($config, $metadata);
 		$afilter = new SimpleSAML_XML_AttributeFilter($config, $session->getAttributes());
-		
+		if (isset($idpmetadata['attributemap'])) {
+			$afilter->namemap($idpmetadata['attributemap']);
+		}
 		if (isset($spmetadata['attributemap'])) {
 			$afilter->namemap($spmetadata['attributemap']);
 		}
-- 
GitLab