Merge pull request #145 from nextcloud/new-slo-url

Implement new SLO URL API
This commit is contained in:
Lukas Reschke 2017-08-30 14:47:02 +02:00 committed by GitHub
commit 45e52c97c3

View file

@ -321,19 +321,20 @@ class UserBackend implements IApacheBackend, UserInterface, IUserBackend {
}
/**
* Creates an attribute which is added to the logout hyperlink. It can
* supply any attribute(s) which are valid for <a>.
*
* @return string with one or more HTML attributes.
* @since 6.0.0
* {@inheritdoc}
*/
public function getLogoutAttribute() {
public function getLogoutUrl() {
$slo = $this->config->getAppValue('user_saml', 'idp-singleLogoutService.url', '');
if($slo === '') {
return 'style="display:none;"';
return '';
}
return 'href="'.$this->urlGenerator->linkToRouteAbsolute('user_saml.SAML.singleLogoutService').'?requesttoken='.urlencode(\OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue()).'"';
return $this->urlGenerator->linkToRouteAbsolute(
'user_saml.SAML.singleLogoutService',
[
'requesttoken' => \OC::$server->getCsrfTokenManager()->getToken()->getEncryptedValue(),
]
);
}
/**