Skip to content
Snippets Groups Projects
Verified Commit a21a46a5 authored by Jan Pavlíček's avatar Jan Pavlíček
Browse files

feat: only allowed idps Disco support for SAML (needed for Beyond)

parent 385d29f3
No related branches found
No related tags found
1 merge request!369feat: only allowed idps Disco support for SAML (needed for Beyond)
Pipeline #578769 passed with stages
in 1 minute and 15 seconds
...@@ -292,6 +292,11 @@ class Disco extends PowerIdPDisco ...@@ -292,6 +292,11 @@ class Disco extends PowerIdPDisco
} }
} }
if (!empty($this->originalsp[Disco::METADATA_ONLY_ALLOWED_IDPS])) {
$onlyAllowedIdps = $this->originalsp[Disco::METADATA_ONLY_ALLOWED_IDPS];
$onlyAllowedIdps = array_fill_keys($onlyAllowedIdps, 1);
}
if ($this->processAarcIdpHintEnabled) { if ($this->processAarcIdpHintEnabled) {
$hintedIdp = $this->processAarcIdpHint($this->state, $hintedIdp); $hintedIdp = $this->processAarcIdpHint($this->state, $hintedIdp);
} }
...@@ -310,7 +315,11 @@ class Disco extends PowerIdPDisco ...@@ -310,7 +315,11 @@ class Disco extends PowerIdPDisco
// either will throw an exception or redirect user, we can end prematurely // either will throw an exception or redirect user, we can end prematurely
return; return;
} elseif (sizeof($idpList) === 1) { } elseif (sizeof($idpList) === 1) {
Logger::info(self::DEBUG_PREFIX . 'Only one Idp left. Redirecting automatically. IdP: ' . $idpList[0]); Logger::info(
self::DEBUG_PREFIX .
'Only one Idp left. Redirecting automatically. IdP: ' .
array_key_first($idpList)
);
$idp = array_keys($idpList)[0]; $idp = array_keys($idpList)[0];
self::redirectToIdP($idp); self::redirectToIdP($idp);
} }
......
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