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

saml_Auth_Source_SP: Add getMetadataURL()-function.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1742 44740490-163a-0410-bde0-09ae8108e29a
parent 91192a5f
No related branches found
No related tags found
No related merge requests found
......@@ -51,7 +51,7 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
if (array_key_exists('entityId', $config)) {
$config['entityid'] = $config['entityId'];
} else {
$config['entityid'] = SimpleSAML_Module::getModuleURL('saml/sp/metadata.php/' . urlencode($this->authId));
$config['entityid'] = $this->getMetadataURL();
}
$this->metadata = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
......@@ -61,6 +61,17 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
}
/**
* Retrieve the URL to the metadata of this SP.
*
* @return string The metadata URL.
*/
public function getMetadataURL() {
return SimpleSAML_Module::getModuleURL('saml/sp/metadata.php/' . urlencode($this->authId));
}
/**
* Retrieve the entity id of this SP.
*
......
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