From 763e17f491218eeb972840b4649f651cc5a5dab1 Mon Sep 17 00:00:00 2001 From: johnson-yi <63399474+johnson-yi@users.noreply.github.com> Date: Wed, 24 Feb 2021 06:05:22 +1100 Subject: [PATCH] Added saml custom setting retrieveParametersFromServer to enable fixing SLO issues with Azure AD (#9187) --- app/Http/Controllers/Auth/SamlController.php | 3 ++- app/Services/Saml.php | 14 ++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/Auth/SamlController.php b/app/Http/Controllers/Auth/SamlController.php index 48c8d05ab8..5a2075daed 100644 --- a/app/Http/Controllers/Auth/SamlController.php +++ b/app/Http/Controllers/Auth/SamlController.php @@ -128,7 +128,8 @@ class SamlController extends Controller public function sls(Request $request) { $auth = $this->saml->getAuth(); - $sloUrl = $auth->processSLO(true, null, null, null, true); + $retrieveParametersFromServer = $this->saml->getSetting('retrieveParametersFromServer', false); + $sloUrl = $auth->processSLO(true, null, $retrieveParametersFromServer, null, true); $errors = $auth->getErrors(); if (!empty($errors)) { diff --git a/app/Services/Saml.php b/app/Services/Saml.php index bb6c24cffb..fa2eb13105 100644 --- a/app/Services/Saml.php +++ b/app/Services/Saml.php @@ -324,6 +324,20 @@ class Saml return $this->_auth; } + /** + * Get a setting. + * + * @author Johnson Yi + * + * @param string|array|int $key + * @param mixed $default + * + * @return void + */ + public function getSetting($key, $default = null) { + return data_get($this->_settings, $key, $default); + } + /** * Gets the SP metadata. The XML representation. *