From fae25fa4ab016275ccf99ac11b306a1c5e9c6550 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Wed, 24 Aug 2022 14:32:57 +0200 Subject: [PATCH] fix signining in with IdPs other than 1 Signed-off-by: Arthur Schiwon --- appinfo/routes.php | 9 --------- lib/Controller/SAMLController.php | 4 ++-- 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/appinfo/routes.php b/appinfo/routes.php index 66057f9..8e04e94 100644 --- a/appinfo/routes.php +++ b/appinfo/routes.php @@ -27,9 +27,6 @@ return [ 'name' => 'SAML#login', 'url' => '/saml/login', 'verb' => 'GET', - 'defaults' => [ - 'idp' => 1 - ], ], [ 'name' => 'SAML#base', @@ -40,17 +37,11 @@ return [ 'name' => 'SAML#getMetadata', 'url' => '/saml/metadata', 'verb' => 'GET', - 'defaults' => [ - 'idp' => 1 - ], ], [ 'name' => 'SAML#assertionConsumerService', 'url' => '/saml/acs', 'verb' => 'POST', - 'defaults' => [ - 'idp' => 1 - ], ], [ 'name' => 'SAML#singleLogoutService', diff --git a/lib/Controller/SAMLController.php b/lib/Controller/SAMLController.php index 14f1996..8db6ac9 100644 --- a/lib/Controller/SAMLController.php +++ b/lib/Controller/SAMLController.php @@ -167,7 +167,7 @@ class SAMLController extends Controller { * @return Http\RedirectResponse * @throws \Exception */ - public function login($idp) { + public function login(int $idp = 1) { $type = $this->config->getAppValue($this->appName, 'type'); switch ($type) { case 'saml': @@ -242,7 +242,7 @@ class SAMLController extends Controller { * @return Http\DataDownloadResponse * @throws Error */ - public function getMetadata($idp) { + public function getMetadata(int $idp = 1) { $settings = new Settings($this->samlSettings->getOneLoginSettingsArray($idp)); $metadata = $settings->getSPMetadata(); $errors = $settings->validateMetadata($metadata);