Skip to content

Commit

Permalink
Merge pull request nextcloud#903 from SUNET/master
Browse files Browse the repository at this point in the history
fix(settings): Fix settings name
  • Loading branch information
blizzz authored Nov 19, 2024
2 parents 188bccf + a806f99 commit 72a8539
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion lib/Controller/SAMLController.php
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ public function login(int $idp = 1): Http\RedirectResponse {
case 'saml':
$settings = $this->samlSettings->getOneLoginSettingsArray($idp);
$auth = new Auth($settings);
$passthroughParamsString = trim($settings['idp-passthroughParameters'] ?? '') ;
$passthroughParamsString = trim($settings['idp']['passthroughParameters'] ?? '') ;
$passthroughParams = array_map('trim', explode(',', $passthroughParamsString));

$passthroughValues = [];
Expand Down
2 changes: 1 addition & 1 deletion lib/Controller/SettingsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ public function getSamlProviderSettings(int $providerId): array {
'singleSignOnService.url' => ['required' => false],
'entityId' => ['required' => false],
'x509cert' => ['required' => false],
'idp-passthroughParameters' => ['required' => false],
'passthroughParameters' => ['required' => false],
];
/* Fetch all config values for the given providerId */

Expand Down
2 changes: 1 addition & 1 deletion lib/SAMLSettings.php
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,6 @@ public function getOneLoginSettingsArray(int $idp): array {
'strict' => true,
'debug' => $this->config->getSystemValue('debug', false),
'baseurl' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.base'),
'idp-passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
'security' => [
'nameIdEncrypted' => ($this->configurations[$idp]['security-nameIdEncrypted'] ?? '0') === '1',
'authnRequestsSigned' => ($this->configurations[$idp]['security-authnRequestsSigned'] ?? '0') === '1',
Expand Down Expand Up @@ -167,6 +166,7 @@ public function getOneLoginSettingsArray(int $idp): array {
'url' => $this->configurations[$idp]['idp-singleSignOnService.url'] ?? '',
],
'x509cert' => $this->configurations[$idp]['idp-x509cert'] ?? '',
'passthroughParameters' => $this->configurations[$idp]['idp-passthroughParameters'] ?? '',
],
];

Expand Down
4 changes: 2 additions & 2 deletions templates/admin.php
Original file line number Diff line number Diff line change
Expand Up @@ -154,8 +154,8 @@
<textarea id="user-saml-x509cert" name="x509cert"><?php p($_['config']['idp-x509cert'] ?? '') ?></textarea>
</p>
<p>
<label class="user-saml-standalone-label" for="user-saml-idp-passthroughParameters"><?php p($l->t('Request parameters to pass-through to IdP (comma separated list)')) ?></label><br/>
<input id="user-saml-idp-passthroughParameters" name="idp-passthroughParameters" value="<?php p($_['config']['idp-passthroughParameters'] ?? '') ?>" type="text" placeholder="idp_hint,extra_parameter"/>
<label class="user-saml-standalone-label" for="user-saml-passthroughParameters"><?php p($l->t('Request parameters to pass-through to IdP (comma separated list)')) ?></label><br/>
<input id="user-saml-passthroughParameters" data-key="idp-passthroughParameters" name="passthroughParameters" value="<?php p($_['config']['idp-passthroughParameters'] ?? '') ?>" type="text" placeholder="idp_hint,extra_parameter"/>
</p>
</div>
</div>
Expand Down

0 comments on commit 72a8539

Please sign in to comment.