Revision: 2073
Author: olavmrk
Date: Tue Jan  5 05:52:00 2010
Log: SAMLParser: Extract name and description from SP metadata.

This patch extracts the name and description of the SP from the
AttributeConsumingService element in the metadata.

Patch by gyufii (http://code.google.com/u/gyufii/), attached to
issue 252.
http://code.google.com/p/simplesamlphp/source/detail?r=2073

Modified:
  /trunk/lib/SimpleSAML/Metadata/SAMLParser.php

=======================================
--- /trunk/lib/SimpleSAML/Metadata/SAMLParser.php       Fri Nov  6 01:02:46 2009
+++ /trunk/lib/SimpleSAML/Metadata/SAMLParser.php       Tue Jan  5 05:52:00 2010
@@ -519,6 +519,14 @@
                if (array_key_exists('attributes', $spd)) {
                        $ret['attributes'] = $spd['attributes'];
                }
+
+               /* Add name & description. */
+               if (array_key_exists('name', $spd)) {
+                       $ret['name'] = $spd['name'];
+               }
+               if (array_key_exists('description', $spd)) {
+                       $ret['description'] = $spd['description'];
+               }

                /* Add certificate data. Only the first valid certificate will 
be added.  
*/
                foreach($spd['keys'] as $key) {
@@ -660,6 +668,14 @@
                if (array_key_exists('attributes', $spd)) {
                        $ret['attributes'] = $spd['attributes'];
                }
+
+               /* Add name & description. */
+               if (array_key_exists('name', $spd)) {
+                       $ret['name'] = $spd['name'];
+               }
+               if (array_key_exists('description', $spd)) {
+                       $ret['description'] = $spd['description'];
+               }

                /* Add certificate data. Only the first valid certificate will 
be added.  
*/
                foreach($spd['keys'] as $key) {

--

You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/simplesamlphp-commits?hl=en.


Reply via email to