From 53061d150814cf5939d1d4dc165d8270ca764109 Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Mon, 6 Dec 2021 13:20:18 +0300 Subject: * add HOOK_POST_LOGOUT * auth_remote: add config option AUTH_REMOTE_POST_LOGOUT_URL --- plugins/auth_remote/init.php | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'plugins') diff --git a/plugins/auth_remote/init.php b/plugins/auth_remote/init.php index 9c15d3368..3203d41fe 100644 --- a/plugins/auth_remote/init.php +++ b/plugins/auth_remote/init.php @@ -1,15 +1,26 @@ add_hook($host::HOOK_AUTH_USER, $this); + + Config::add(self::AUTH_REMOTE_POST_LOGOUT_URL, "", Config::T_STRING); + + if (Config::get(self::AUTH_REMOTE_POST_LOGOUT_URL) != "") { + $host->add_hook($host::HOOK_POST_LOGOUT, $this); + } } function get_login_by_ssl_certificate() : string { @@ -73,6 +84,12 @@ class Auth_Remote extends Auth_Base { return false; } + function hook_post_logout($login, $user_id) { + return [ + Config::get(self::AUTH_REMOTE_POST_LOGOUT_URL) + ]; + } + function api_version() { return 2; } -- cgit v1.2.3