fix signining in with IdPs other than 1

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2022-08-24 14:32:57 +02:00
parent c058e1736d
commit fae25fa4ab
No known key found for this signature in database
GPG key ID: 7424F1874854DF23
2 changed files with 2 additions and 11 deletions

View file

@ -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',

View file

@ -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);