Skip to content

Commit

Permalink
Testing IdP fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
Peterburnett committed Jan 30, 2024
1 parent d1e99ed commit 8b146b0
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .extlib/simplesamlphp/modules/saml/src/Auth/Source/SP.php
Original file line number Diff line number Diff line change
Expand Up @@ -310,17 +310,19 @@ public function getIdPMetadata(string $entityId): Configuration
global $saml2auth;
if ($this->idp !== null && $this->idp !== $entityId) {
foreach ($saml2auth->metadataentities as $metadataurl => $idpentities) {
if ($metadataurl == $entityId) {
if ($metadataurl ==='xml' || $metadataurl == $entityId) {
foreach ($idpentities as $key => $val) {
if ($key == $this->idp) {
$this->idp = null;
}

break 2;

}
}
}
}
unset($this->idp);
if ($this->idp !== null && $this->idp !== $entityId) {
throw new Error\Exception('Cannot retrieve metadata for IdP ' .
var_export($entityId, true) . ' because it isn\'t a valid IdP for this SP.');
Expand Down

0 comments on commit 8b146b0

Please sign in to comment.