mirror of
https://github.com/netzbegruenung/user_saml.git
synced 2024-05-05 02:23:42 +02:00
Implement new SLO URL API
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
This commit is contained in:
parent
30821a6389
commit
2d4aad3487
|
@ -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(),
|
||||
]
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in a new issue