diff options
Diffstat (limited to 'app/Controllers/authController.php')
| -rw-r--r-- | app/Controllers/authController.php | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/app/Controllers/authController.php b/app/Controllers/authController.php index 73a640748..06eca7d9e 100644 --- a/app/Controllers/authController.php +++ b/app/Controllers/authController.php @@ -246,4 +246,15 @@ class FreshRSS_auth_Controller extends FreshRSS_ActionController { $this->view->preferred_language = Minz_Translate::getLanguage(null, Minz_Request::getPreferredLanguages(), FreshRSS_Context::$system_conf->language); FreshRSS_View::prependTitle(_t('gen.auth.registration.title') . ' · '); } + + public static function getLogoutUrl(): string { + if (($_SERVER['AUTH_TYPE'] ?? '') === 'openid-connect') { + $url_string = urlencode(Minz_Request::guessBaseUrl()); + return './oidc/?logout=' . $url_string . '/'; + # The trailing slash is necessary so that we don’t redirect to http://. + # https://bz.apache.org/bugzilla/show_bug.cgi?id=61355#c13 + } else { + return _url('auth', 'logout') ?: ''; + } + } } |
