Revision: 3235
Author:   olavmrk
Date:     Tue Apr  9 23:21:37 2013
Log:      saml: Add support for more contact types in SP metadata.

Thanks to François Kooman for implementing this!
http://code.google.com/p/simplesamlphp/source/detail?r=3235

Modified:
 /trunk/modules/saml/docs/sp.txt
 /trunk/modules/saml/www/sp/metadata.php

=======================================
--- /trunk/modules/saml/docs/sp.txt     Thu Oct 18 03:31:00 2012
+++ /trunk/modules/saml/docs/sp.txt     Tue Apr  9 23:21:37 2013
@@ -209,6 +209,25 @@
 `certificate`
: File name of certificate for this SP. This certificate will be included in generated metadata.

+`contacts`
+: Specify contacts in addition to the `technical` contact configured through `config/config.php`.
+
+:   For example, specifying a support contact:
+
+        'contacts' => array(
+            array(
+                'contactType'       => 'support',
+                'emailAddress'      => 'supp...@example.org',
+                'givenName'         => 'John',
+                'surName'           => 'Doe',
+                'telephoneNumber'   => '+31(0)12345678',
+                'company'           => 'Example Inc.',
+            )
+        ),
+
+: Valid values for `contactType` are: `technical`, `support`, `administrative`, `billing` and `other`. All
+    fields, except `contactType` are OPTIONAL.
+
 `description`
 :   A description of this SP.
Will be added to the generated metadata, in an AttributeConsumingService element.
=======================================
--- /trunk/modules/saml/www/sp/metadata.php     Wed Apr  3 04:27:50 2013
+++ /trunk/modules/saml/www/sp/metadata.php     Tue Apr  9 23:21:37 2013
@@ -169,6 +169,9 @@
                $contact['givenName'] = $name;
        }
 }
+
+// add additional contacts
+$contacts = $spconfig->getArray('contacts', array());

 // add certificate
 if (count($keys) === 1) {
@@ -191,6 +194,9 @@
 $metaBuilder->addMetadataSP20($metaArray20, $supported_protocols);
 $metaBuilder->addOrganizationInfo($metaArray20);
 if ( !empty($contact) ) $metaBuilder->addContact('technical', $contact);
+foreach ($contacts as $c) {
+    $metaBuilder->addContact($c['contactType'], $c);
+}

 $xml = $metaBuilder->getEntityDescriptorText();

--
You received this message because you are subscribed to the Google Groups 
"simpleSAMLphp commits" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to simplesamlphp-commits+unsubscr...@googlegroups.com.
To post to this group, send email to simplesamlphp-commits@googlegroups.com.
Visit this group at http://groups.google.com/group/simplesamlphp-commits?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to