From 3e02d5aff85babc3ffbfcf52313f2108e313aa23 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Sat, 13 Apr 2024 13:46:43 +0200 Subject: Adding upstream version 2.12.1. Signed-off-by: Daniel Baumann --- public/js/logout.js | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 public/js/logout.js (limited to 'public/js/logout.js') diff --git a/public/js/logout.js b/public/js/logout.js new file mode 100644 index 0000000..b9ac400 --- /dev/null +++ b/public/js/logout.js @@ -0,0 +1,16 @@ +;(function () { + /** + * When JavaScript is available, trigger an XmlHTTPRequest with the non-existing user 'logout' and abort it + * before it is able to finish. This will cause the browser to show a new authentication prompt in the next + * request. + */ + document.getElementById('logout-in-progress').hidden = true; + document.getElementById('logout-successful').hidden = false; + try { + var xhttp = new XMLHttpRequest(); + xhttp.open('GET', 'arbitrary url', true, 'logout', 'logout'); + xhttp.send(''); + xhttp.abort(); + } catch (e) { + } +})(); -- cgit v1.2.3