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

Add support for overriding autogenerated metadata values for endpoints. Can be

useful if simpleSAMLphp is running behind a reverse proxy or in a CMS.


git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@555 44740490-163a-0410-bde0-09ae8108e29a
parent 71cd422a
No related branches found
No related tags found
No related merge requests found
...@@ -385,6 +385,36 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt ...@@ -385,6 +385,36 @@ openssl x509 -req -days 60 -in server2.csr -signkey server2.key -out server2.crt
<literal>eduPersonPrincipalName</literal>.</para> <literal>eduPersonPrincipalName</literal>.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
<glossentry>
<glossterm>SingleSignOnService</glossterm>
<glossdef>
<para>Override the default URL for the SingleSignOnService
for this IdP. This is an absolute URL. The default value is
<literal>&lt;simpleSAMLphp-root&gt;/saml2/idp/SSOService.php</literal></para>
<para>Note that this only changes the values in the generated
metadata and in the messages sent to others. You must also
configure your webserver to deliver this URL to the correct
PHP page.</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>SingleLogoutService</glossterm>
<glossdef>
<para>Override the default URL for the SingleLogoutService
for this IdP. This is an absolute URL. The default value is
<literal>&lt;simpleSAMLphp-root&gt;/saml2/idp/SingleLogoutService.php</literal></para>
<para>Note that this only changes the values in the generated
metadata and in the messages sent to others. You must also
configure your webserver to deliver this URL to the correct
PHP page.</para>
</glossdef>
</glossentry>
</glosslist> </glosslist>
</section> </section>
......
...@@ -256,6 +256,36 @@ ...@@ -256,6 +256,36 @@
default for this SP.</para> default for this SP.</para>
</glossdef> </glossdef>
</glossentry> </glossentry>
<glossentry>
<glossterm>AssertionConsumerService</glossterm>
<glossdef>
<para>Override the default URL for the AssertionConsumerService
for this SP. This is an absolute URL. The default value is
<literal>&lt;simpleSAMLphp-root&gt;/saml2/sp/AssertionConsumerService.php</literal></para>
<para>Note that this only changes the values in the generated
metadata and in the messages sent to others. You must also
configure your webserver to deliver this URL to the correct
PHP page.</para>
</glossdef>
</glossentry>
<glossentry>
<glossterm>SingleLogoutService</glossterm>
<glossdef>
<para>Override the default URL for the SingleLogoutService
for this SP. This is an absolute URL. The default value is
<literal>&lt;simpleSAMLphp-root&gt;/saml2/sp/SingleLogoutService.php</literal></para>
<para>Note that this only changes the values in the generated
metadata and in the messages sent to others. You must also
configure your webserver to deliver this URL to the correct
PHP page.</para>
</glossdef>
</glossentry>
</glosslist> </glosslist>
</section> </section>
...@@ -635,6 +665,29 @@ ...@@ -635,6 +665,29 @@
</glossentry> </glossentry>
</glosslist> </glosslist>
</section> </section>
<section>
<title>Optional metadata fields</title>
<para>These fields can be left out if not needed.</para>
<glosslist>
<glossentry>
<glossterm>AssertionConsumerService</glossterm>
<glossdef>
<para>Override the default URL for the AssertionConsumerService
for this SP. This is an absolute URL. The default value is
<literal>&lt;simpleSAMLphp-root&gt;/shib13/sp/AssertionConsumerService.php</literal></para>
<para>Note that this only changes the values in the generated
metadata and in the messages sent to others. You must also
configure your webserver to deliver this URL to the correct
PHP page.</para>
</glossdef>
</glossentry>
</glosslist>
</section>
</section> </section>
<section> <section>
......
...@@ -91,6 +91,16 @@ class SimpleSAML_Metadata_MetaDataStorageHandler { ...@@ -91,6 +91,16 @@ class SimpleSAML_Metadata_MetaDataStorageHandler {
* @return The autogenerated metadata property. * @return The autogenerated metadata property.
*/ */
public function getGenerated($property, $set = 'saml20-sp-hosted') { public function getGenerated($property, $set = 'saml20-sp-hosted') {
/* First we check if the user has overridden this property in the metadata. */
try {
$metadataSet = $this->getMetaDataCurrent($set);
if(array_key_exists($property, $metadataSet)) {
return $metadataSet[$property];
}
} catch(Exception $e) {
/* Probably metadata wasn't found. In any case we continue by generating the metadata. */
}
/* Get the configuration. */ /* Get the configuration. */
$config = SimpleSAML_Configuration::getInstance(); $config = SimpleSAML_Configuration::getInstance();
......
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