Skip to content
Snippets Groups Projects
Unverified Commit 809260a5 authored by Simão Martins's avatar Simão Martins Committed by GitHub
Browse files

Support saml:Extensions inside Authsources.php (#1349)

parent 084f7f2f
No related branches found
No related tags found
No related merge requests found
...@@ -586,15 +586,20 @@ class SP extends \SimpleSAML\Auth\Source ...@@ -586,15 +586,20 @@ class SP extends \SimpleSAML\Auth\Source
$ar->setRequesterID($requesterID); $ar->setRequesterID($requesterID);
if (isset($state['saml:Extensions'])) { // If the downstream SP has set extensions then use them.
// Otherwise use extensions that might be defined in the local SP (only makes sense in a proxy scenario)
if (isset($state['saml:Extensions']) && count($state['saml:Extensions']) > 0) {
$ar->setExtensions($state['saml:Extensions']); $ar->setExtensions($state['saml:Extensions']);
} else if ($this->metadata->getArray('saml:Extensions', null) !== null) {
$ar->setExtensions($this->metadata->getArray('saml:Extensions'));
} }
$providerName = $this->metadata->getString("ProviderName", null); $providerName = $this->metadata->getString("ProviderName", null);
if ($providerName !== null) { if ($providerName !== null) {
$ar->setProviderName($providerName); $ar->setProviderName($providerName);
} }
// save IdP entity ID as part of the state // save IdP entity ID as part of the state
$state['ExpectedIssuer'] = $idpMetadata->getString('entityid'); $state['ExpectedIssuer'] = $idpMetadata->getString('entityid');
......
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