Skip to content

Commit 1bb98b4

Browse files
authored
Merge pull request #647 from nextcloud/fix/630/default-idp-value
fix signining in with IdPs other than 1
2 parents c058e17 + fae25fa commit 1bb98b4

2 files changed

Lines changed: 2 additions & 11 deletions

File tree

appinfo/routes.php

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,6 @@
2727
'name' => 'SAML#login',
2828
'url' => '/saml/login',
2929
'verb' => 'GET',
30-
'defaults' => [
31-
'idp' => 1
32-
],
3330
],
3431
[
3532
'name' => 'SAML#base',
@@ -40,17 +37,11 @@
4037
'name' => 'SAML#getMetadata',
4138
'url' => '/saml/metadata',
4239
'verb' => 'GET',
43-
'defaults' => [
44-
'idp' => 1
45-
],
4640
],
4741
[
4842
'name' => 'SAML#assertionConsumerService',
4943
'url' => '/saml/acs',
5044
'verb' => 'POST',
51-
'defaults' => [
52-
'idp' => 1
53-
],
5445
],
5546
[
5647
'name' => 'SAML#singleLogoutService',

lib/Controller/SAMLController.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ private function autoprovisionIfPossible() {
167167
* @return Http\RedirectResponse
168168
* @throws \Exception
169169
*/
170-
public function login($idp) {
170+
public function login(int $idp = 1) {
171171
$type = $this->config->getAppValue($this->appName, 'type');
172172
switch ($type) {
173173
case 'saml':
@@ -242,7 +242,7 @@ public function login($idp) {
242242
* @return Http\DataDownloadResponse
243243
* @throws Error
244244
*/
245-
public function getMetadata($idp) {
245+
public function getMetadata(int $idp = 1) {
246246
$settings = new Settings($this->samlSettings->getOneLoginSettingsArray($idp));
247247
$metadata = $settings->getSPMetadata();
248248
$errors = $settings->validateMetadata($metadata);

0 commit comments

Comments
 (0)