X-Git-Url: https://www.chiark.greenend.org.uk/ucgi/~mdw/git/chopwood/blobdiff_plain/6a749ccfccef95865f1892caa223a4e3b52f0858..76ee7d4f64bc1f20013f44c8045cd708ef0b9641:/cmd-cgi.py diff --git a/cmd-cgi.py b/cmd-cgi.py index 6dc59ee..63253b7 100644 --- a/cmd-cgi.py +++ b/cmd-cgi.py @@ -85,6 +85,13 @@ def cmd_reset_cgi(services = []): def cmd_clear_cgi(services = []): operate('clear passwords', 'clear', services) +@CGI.subcommand( + 'logout', ['cgi'], + 'Log out of the web interface.') +def cmd_logout_cgi(): + CGI.redirect(CGI.action('login', why = 'LOGOUT'), + set_cookie = HA.bake_cookie('logged-out')) + @CGI.subcommand( 'fail', ['cgi-noauth'], 'Raise an exception, to test the error reporting machinery.',