Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/user_saml.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Petry <vincent@nextcloud.com>2022-08-25 18:03:49 +0300
committerGitHub <noreply@github.com>2022-08-25 18:03:49 +0300
commit1bb98b4e000d3de8cb150e60030f307a26ac1930 (patch)
treeb3bde5a6b7918a5c3633a6fb14d146c725a0eb5a
parentc058e1736d3e365489999b493fbfdfe9d41eb246 (diff)
parentfae25fa4ab016275ccf99ac11b306a1c5e9c6550 (diff)
Merge pull request #647 from nextcloud/fix/630/default-idp-value
fix signining in with IdPs other than 1
-rw-r--r--appinfo/routes.php9
-rw-r--r--lib/Controller/SAMLController.php4
2 files changed, 2 insertions, 11 deletions
diff --git a/appinfo/routes.php b/appinfo/routes.php
index 66057f98..8e04e946 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 14f19967..8db6ac97 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);