diff options
author | Olav Morken <olav.morken@uninett.no> | 2013-04-10 06:21:37 +0000 |
---|---|---|
committer | Olav Morken <olav.morken@uninett.no> | 2013-04-10 06:21:37 +0000 |
commit | cc70193a4fffd4882c7253777dba8ac4ba4e68f2 (patch) | |
tree | d018b2b1fd643150640bebbbe136fb7a87aea63e | |
parent | 6f18db2002a6a1f3e37fa184432810f63335d110 (diff) | |
download | simplesamlphp-cc70193a4fffd4882c7253777dba8ac4ba4e68f2.zip simplesamlphp-cc70193a4fffd4882c7253777dba8ac4ba4e68f2.tar.gz simplesamlphp-cc70193a4fffd4882c7253777dba8ac4ba4e68f2.tar.bz2 |
saml: Add support for more contact types in SP metadata.
Thanks to François Kooman for implementing this!
git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@3235 44740490-163a-0410-bde0-09ae8108e29a
-rw-r--r-- | modules/saml/docs/sp.txt | 19 | ||||
-rw-r--r-- | modules/saml/www/sp/metadata.php | 6 |
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(); |