TIP JQAutoLogoutContrib is not installed on Foswiki.org.

JQAutoLogoutContrib

Log out idle user after a certain period of time

Description

This extension will allow to automatically log out users after a certain period of time that they have been idle on the website. After a certain timeout a popup will be displayed warning the user that they will be logged out automatically after another 10 seconds.

screenshot.png

Settings

To enable the plugin you will have to add it to the DefaultPlugin settings of JQueryPlugin so that it is loaded on every page.

$Foswiki::cfg{JQueryPlugin}{DefaultPlugins} = 'autologout';

Alternatively, you can add it to the current page using:

%JQREQUIRE{"autologout"}%

You may either put this in one of your skin templates or in a topic text.

The plugin may be configured by preference settings. Defaults are:

   * Set AUTOLOGOUT_TIMEOUT = 900
   * Set AUTOLOGOUT_COUNTDOWN = 10
   * Set AUTOLOGOUT_URL = %SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?logout=1

The jQuery plugin understands a few more options as can be seen in the autologout.tmpl file.

Parameter Description Default
data-idle-timeout seconds after which the warning dialog will pop up %AUTOLOGOUT_TIMEOUT% or 900 if undefined (15 minutes)
data-countdown number of seconds displayed in the logout popup warning after which the user will be logged out %AUTOLOGOUT_COUNTDOWN% or 10 otherwise
data-logout-url the url which is used to log out the user; this may be any location on your Foswiki but must have the logout=1 url parameter attached to it to perform the actual logout procedure %AUTOLOGOUT_URL% or %SCRIPTURLPATH{"view"}%/%WEB%/%TOPIC%?logout=1 otherwise
data-enable-if this is a jQuery selector that must be found on a page to start the auto logout process .natViewBody, .natBodyAuthenticated, body.patternViewPage, body.foswikiLoggedIn (covers NatSkin and PatternSkin)
data-disable-if this is a jQuery selector that must NOT be found on a page or otherwise the auto logout process is supressed body.foswikiGuest, .natBodyNotAuthenticated (covers NatSkin and PatternSkin)
data-events list of (space-separated) events that will restart the logout timer click mousemove scroll keypress

Note that a single sign on login manager might log you in right after having you logged out temporarily. You might need to configure AUTOLOGOUT_URL to a location that does not require authentication again.

Installation Instructions

You do not need to install anything in the browser to use this extension. The following instructions are for the administrator who installs the extension on the server.

Open configure, and open the "Extensions" section. "Extensions Operation and Maintenance" Tab -> "Install, Update or Remove extensions" Tab. Click the "Search for Extensions" button. Enter part of the extension name or description and press search. Select the desired extension(s) and click install. If an extension is already installed, it will not show up in the search results.

You can also install from the shell by running the extension installer as the web server user: (Be sure to run as the webserver user, not as root!)
cd /path/to/foswiki
perl tools/extension_installer <NameOfExtension> install

If you have any problems, or if the extension isn't available in configure, then you can still install manually from the command-line. See https://foswiki.org/Support/ManuallyInstallingExtensions for more help.

Dependencies

None

Change History

24 Jan 2024 fixed use of autologout tmpl definition
21 Apr 2020 fixed manifest
09 Dec 2018 improved algorithm
07 Dec 2018 make it work on multiple tabs
29 Nov 2018 initial release

PackageForm edit

Author Michael Daum
Version 1.20
Release 22 Jan 2024
Description Log out idle user after a certain period of time
Copyright 2018-2024, Michael Daum, All Rights Reserved
License GPL (GNU General Public License)
Home http://foswiki.org/Extensions/JQAutoLogoutContrib
Support http://foswiki.org/Support/JQAutoLogoutContrib
Repository https://github.com/foswiki/JQAutoLogoutContrib
ExtensionClassification Interface and Visualisation, Security, User interactivity
ExtensionType ContribPackage
Compatibility
IncompatibleWith
ImageUrl screenshot.png
DemoUrl http://
SupportUrl JQAutoLogoutContrib
ModificationPolicy CoordinateWithAuthor
I Attachment Action Size Date Who Comment
JQAutoLogoutContrib.md5md5 JQAutoLogoutContrib.md5 manage 180 bytes 22 Jan 2024 - 10:46 MichaelDaum  
JQAutoLogoutContrib.sha1sha1 JQAutoLogoutContrib.sha1 manage 204 bytes 22 Jan 2024 - 10:46 MichaelDaum  
JQAutoLogoutContrib.tgztgz JQAutoLogoutContrib.tgz manage 25 K 22 Jan 2024 - 10:46 MichaelDaum  
JQAutoLogoutContrib.zipzip JQAutoLogoutContrib.zip manage 42 K 22 Jan 2024 - 10:46 MichaelDaum  
JQAutoLogoutContrib_installerEXT JQAutoLogoutContrib_installer manage 6 K 22 Jan 2024 - 10:46 MichaelDaum  
screenshot.pngpng screenshot.png manage 12 K 22 Jan 2024 - 10:46 MichaelDaum  
Topic revision: r5 - 22 Jan 2024, MichaelDaum
The copyright of the content on this website is held by the contributing authors, except where stated elsewhere. See Copyright Statement. Creative Commons License    Legal Imprint    Privacy Policy