Skip to content

Commit 4cd4c49

Browse files
blizzzbackportbot[bot]
authored andcommitted
optional possibility to provide a URL for SLO Response
Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
1 parent cf6c446 commit 4cd4c49

3 files changed

Lines changed: 8 additions & 0 deletions

File tree

lib/Controller/SettingsController.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ public function getSamlProviderSettings($providerId) {
5757
$params = $this->admin->getForm()->getParams();
5858
$params['idp'] = [
5959
'singleLogoutService.url' => ['required' => false],
60+
'singleLogoutService.responseUrl' => ['required' => false],
6061
'singleSignOnService.url' => ['required' => false],
6162
'entityId' => ['required' => false],
6263
'x509cert' => ['required' => false],
@@ -91,6 +92,7 @@ public function deleteSamlProviderSettings($providerId) {
9192
$params = $this->admin->getForm()->getParams();
9293
$params['idp'] = [
9394
'singleLogoutService.url' => null,
95+
'singleLogoutService.responseUrl' => null,
9496
'singleSignOnService.url' => null,
9597
'idp-entityId' => null,
9698
];

lib/SAMLSettings.php

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -158,6 +158,11 @@ public function getOneLoginSettingsArray($idp) {
158158
$settings['sp']['singleLogoutService'] = [
159159
'url' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.singleLogoutService'),
160160
];
161+
162+
$sloResponseUrl = $this->config->getAppValue('user_saml', $prefix . 'idp-singleLogoutService.responseUrl', '');
163+
if($sloResponseUrl !== '') {
164+
$settings['idp']['singleLogoutService']['responseUrl'] = $sloResponseUrl;
165+
}
161166
}
162167

163168
return $settings;

templates/admin.php

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,7 @@
132132
<p><span class="toggle"><?php p($l->t('Show optional Identity Provider settings…')) ?></span></p>
133133
<div class="hidden">
134134
<p><input name="singleLogoutService.url" value="<?php p(\OC::$server->getConfig()->getAppValue('user_saml', 'idp-singleLogoutService.url', '')) ?>" type="text" placeholder="<?php p($l->t('URL Location of the IdP where the SP will send the SLO Request')) ?>"/></p>
135+
<p><input name="singleLogoutService.responseUrl" value="<?php p(\OC::$server->getConfig()->getAppValue('user_saml', 'idp-singleLogoutService.responseUrl', '')) ?>" type="text" placeholder="<?php p($l->t('URL Location of the IDP\'s SLO Response')) ?>"/></p>
135136
<p><textarea name="x509cert" placeholder="<?php p($l->t('Public X.509 certificate of the IdP')) ?>"><?php p(\OC::$server->getConfig()->getAppValue('user_saml', 'idp-x509cert', '')) ?></textarea></p>
136137
</div>
137138
</div>

0 commit comments

Comments
 (0)