Skip to content
Snippets Groups Projects
Commit 7cc6b92f authored by Olav Morken's avatar Olav Morken
Browse files

saml/sp: Add organization information to metadata.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@2162 44740490-163a-0410-bde0-09ae8108e29a
parent b9cb9369
No related branches found
No related tags found
No related merge requests found
...@@ -169,6 +169,35 @@ Options ...@@ -169,6 +169,35 @@ Options
: *Note 2*: SAML 2 specific. : *Note 2*: SAML 2 specific.
`OrganizationName`
: The name of the organization responsible for this SP.
This name does not need to be suitable for display to end users.
: This option can be translated into multiple languages by specifying the value as an array of language-code to translated name:
'OrganizationName' => array(
'en' => 'Example organization',
'no' => 'Eksempel organisation',
),
: *Note*: If you specify this option, you must also specify the `OrganizationURL` option.
`OrganizationDisplayName`
: The name of the organization responsible for this SP.
This name must be suitable for display to end users.
If this option isn't specified, `OrganizationName` will be used instead.
: This option can be translated into multiple languages by specifying the value as an array of language-code to translated name.
: *Note*: If you specify this option, you must also specify the `OrganizationName` option.
`OrganizationURL`
: An URL the end user can access for more information about the organization.
: This option can be translated into multiple languages by specifying the value as an array of language-code to translated URL.
: *Note*: If you specify this option, you must also specify the `OrganizationName` option.
`privatekey` `privatekey`
: File name of private key to be used for signing messages and decrypting messages from the IdP. This option is only required if you use encrypted assertions or if you enable signing of messages. : File name of private key to be used for signing messages and decrypting messages from the IdP. This option is only required if you use encrypted assertions or if you enable signing of messages.
......
...@@ -77,6 +77,24 @@ $metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($entityId); ...@@ -77,6 +77,24 @@ $metaBuilder = new SimpleSAML_Metadata_SAMLBuilder($entityId);
$metaBuilder->addMetadataSP11($metaArray11); $metaBuilder->addMetadataSP11($metaArray11);
$metaBuilder->addMetadataSP20($metaArray20); $metaBuilder->addMetadataSP20($metaArray20);
$orgName = $spconfig->getLocalizedString('OrganizationName', NULL);
if ($orgName !== NULL) {
$orgDisplayName = $spconfig->getLocalizedString('OrganizationDisplayName', NULL);
if ($orgDisplayName === NULL) {
$orgDisplayName = $orgName;
}
$orgURL = $spconfig->getLocalizedString('OrganizationURL', NULL);
if ($orgURL === NULL) {
throw new SimpleSAML_Error_Exception('If OrganizationName is set, OrganizationURL must also be set.');
}
$metaBuilder->addOrganization($orgName, $orgDisplayName, $orgURL);
}
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
$metaBuilder->addContact('technical', array( $metaBuilder->addContact('technical', array(
'emailAddress' => $config->getString('technicalcontact_email', NULL), 'emailAddress' => $config->getString('technicalcontact_email', NULL),
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment