summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--modules/saml/docs/sp.txt19
-rw-r--r--modules/saml/www/sp/metadata.php6
2 files changed, 25 insertions, 0 deletions
diff --git a/modules/saml/docs/sp.txt b/modules/saml/docs/sp.txt
index a3dfb86..84f8ca4 100644
--- a/modules/saml/docs/sp.txt
+++ b/modules/saml/docs/sp.txt
@@ -209,6 +209,25 @@ Options
`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' => 'support@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.
diff --git a/modules/saml/www/sp/metadata.php b/modules/saml/www/sp/metadata.php
index 7fcbd9c..6e28942 100644
--- a/modules/saml/www/sp/metadata.php
+++ b/modules/saml/www/sp/metadata.php
@@ -170,6 +170,9 @@ if ( $email != 'na@example.org') {
}
}
+// add additional contacts
+$contacts = $spconfig->getArray('contacts', array());
+
// add certificate
if (count($keys) === 1) {
$metaArray20['certData'] = $keys[0]['X509Certificate'];
@@ -191,6 +194,9 @@ $metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($entityId);
$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();