optional possibility to provide a URL for SLO Response

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
This commit is contained in:
Arthur Schiwon 2020-06-22 18:21:30 +02:00
parent ec12fbaec9
commit 2a614e0337
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
3 changed files with 8 additions and 0 deletions

View File

@ -57,6 +57,7 @@ class SettingsController extends Controller {
$params = $this->admin->getForm()->getParams();
$params['idp'] = [
'singleLogoutService.url' => ['required' => false],
'singleLogoutService.responseUrl' => ['required' => false],
'singleSignOnService.url' => ['required' => false],
'entityId' => ['required' => false],
'x509cert' => ['required' => false],
@ -91,6 +92,7 @@ class SettingsController extends Controller {
$params = $this->admin->getForm()->getParams();
$params['idp'] = [
'singleLogoutService.url' => null,
'singleLogoutService.responseUrl' => null,
'singleSignOnService.url' => null,
'idp-entityId' => null,
];

View File

@ -158,6 +158,11 @@ class SAMLSettings {
$settings['sp']['singleLogoutService'] = [
'url' => $this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.singleLogoutService'),
];
$sloResponseUrl = $this->config->getAppValue('user_saml', $prefix . 'idp-singleLogoutService.responseUrl', '');
if($sloResponseUrl !== '') {
$settings['idp']['singleLogoutService']['responseUrl'] = $sloResponseUrl;
}
}
return $settings;

View File

@ -132,6 +132,7 @@ style('user_saml', 'admin');
<p><span class="toggle"><?php p($l->t('Show optional Identity Provider settings…')) ?></span></p>
<div class="hidden">
<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>
<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>
<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>
</div>
</div>