Browse Source

optional possibility to provide a URL for SLO Response

Signed-off-by: Arthur Schiwon <blizzz@arthur-schiwon.de>
master
Arthur Schiwon 2 years ago
parent
commit
2a614e0337
No known key found for this signature in database
GPG Key ID: 7424F1874854DF23
  1. 2
      lib/Controller/SettingsController.php
  2. 5
      lib/SAMLSettings.php
  3. 1
      templates/admin.php

2
lib/Controller/SettingsController.php

@ -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,
];

5
lib/SAMLSettings.php

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

1
templates/admin.php

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

Loading…
Cancel
Save