From e99d5f8a1e391be891027ec2126f7605c0c02c0a Mon Sep 17 00:00:00 2001
From: Olav Morken <olav.morken@uninett.no>
Date: Wed, 16 Sep 2009 11:11:31 +0000
Subject: [PATCH] SimpleSAML_Metadata_SAMLParser: Add the attributes that SAML
 1 SPs should receive.

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

diff --git a/lib/SimpleSAML/Metadata/SAMLParser.php b/lib/SimpleSAML/Metadata/SAMLParser.php
index 352e1523f..5bf492a09 100644
--- a/lib/SimpleSAML/Metadata/SAMLParser.php
+++ b/lib/SimpleSAML/Metadata/SAMLParser.php
@@ -485,6 +485,11 @@ class SimpleSAML_Metadata_SAMLParser {
 			$ret['AssertionConsumerService'] = $acs['Location'];
 		}
 
+		/* Add the list of attributes the SP should receive. */
+		if (array_key_exists('attributes', $spd)) {
+			$ret['attributes'] = $spd['attributes'];
+		}
+
 		/* Add certificate data. Only the first valid certificate will be added. */
 		foreach($spd['keys'] as $key) {
 			if($key['type'] !== 'X509Certificate') {
@@ -636,6 +641,7 @@ class SimpleSAML_Metadata_SAMLParser {
 			$ret['NameIDFormat'] = $spd['nameIDFormats'][0];
 		}
 
+		/* Add the list of attributes the SP should receive. */
 		if (array_key_exists('attributes', $spd)) {
 			$ret['attributes'] = $spd['attributes'];
 		}
-- 
GitLab