Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(settings): Fix settings name #903

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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'] ?? '',
mickenordin marked this conversation as resolved.
Show resolved Hide resolved
],
];

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