Skip to content
Snippets Groups Projects
Unverified Commit f93eb031 authored by m0ark's avatar m0ark Committed by GitHub
Browse files

Update MetaLoader.php

Fixing loading behaviour according to the documentation
parent 401cf1d1
No related branches found
No related tags found
No related merge requests found
......@@ -161,14 +161,24 @@ class sspmod_metarefresh_MetaLoader
$template = null;
if (array_key_exists('template', $source)) $template = $source['template'];
$this->addMetadata($source['src'], $entity->getMetadata1xSP(), 'shib13-sp-remote', $template);
$this->addMetadata($source['src'], $entity->getMetadata1xIdP(), 'shib13-idp-remote', $template);
$this->addMetadata($source['src'], $entity->getMetadata20SP(), 'saml20-sp-remote', $template);
$this->addMetadata($source['src'], $entity->getMetadata20IdP(), 'saml20-idp-remote', $template);
$attributeAuthorities = $entity->getAttributeAuthorities();
if (!empty($attributeAuthorities)) {
$this->addMetadata($source['src'], $attributeAuthorities[0], 'attributeauthority-remote', $template);
}
if (in_array('shib13-sp-remote', $this->types)) {
$this->addMetadata($source['src'], $entity->getMetadata1xSP(), 'shib13-sp-remote', $template);
}
if (in_array('shib13-idp-remote', $this->types)) {
$this->addMetadata($source['src'], $entity->getMetadata1xIdP(), 'shib13-idp-remote', $template);
}
if (in_array('saml20-sp-remote', $this->types)) {
$this->addMetadata($source['src'], $entity->getMetadata20SP(), 'saml20-sp-remote', $template);
}
if (in_array('saml20-idp-remote', $this->types)) {
$this->addMetadata($source['src'], $entity->getMetadata20IdP(), 'saml20-idp-remote', $template);
}
if (in_array('attributeauthority-remote', $this->types)) {
$attributeAuthorities = $entity->getAttributeAuthorities();
if (!empty($attributeAuthorities)) {
$this->addMetadata($source['src'], $attributeAuthorities[0], 'attributeauthority-remote', $template);
}
}
}
$this->saveState($source, $responseHeaders);
......
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