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

saml: Restructure code to get correct error message for invalid entityID.

git-svn-id: https://simplesamlphp.googlecode.com/svn/trunk@1840 44740490-163a-0410-bde0-09ae8108e29a
parent f69f2a64
No related branches found
No related tags found
No related merge requests found
......@@ -47,15 +47,15 @@ class sspmod_saml_Auth_Source_SP extends SimpleSAML_Auth_Source {
/* Call the parent constructor first, as required by the interface. */
parent::__construct($info, $config);
/* For compatibility with code that assumes that $metadata->getString('entityid') gives the entity id. */
if (array_key_exists('entityID', $config)) {
$config['entityid'] = $config['entityID'];
} else {
$config['entityid'] = $this->getMetadataURL();
if (!array_key_exists('entityID', $config)) {
$config['entityID'] = $this->getMetadataURL();
}
/* For compatibility with code that assumes that $metadata->getString('entityid') gives the entity id. */
$config['entityid'] = $config['entityID'];
$this->metadata = SimpleSAML_Configuration::loadFromArray($config, 'authsources[' . var_export($this->authId, TRUE) . ']');
$this->entityId = $this->metadata->getString('entityid');
$this->entityId = $this->metadata->getString('entityID');
$this->idp = $this->metadata->getString('idp', NULL);
$this->discoURL = $this->metadata->getString('discoURL', 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