Skip to content

Public Configuration Variables

JillElaine edited this page Mar 25, 2015 · 24 revisions

//############################## //## Public Configuration Variables //############################## var defaults = { idleTimeLimit: 1200, // 'No activity' time limit in seconds. 1200 = 20 Minutes redirectUrl: '/logout', // redirect to this url on timeout logout. Set to "redirectUrl: false" to disable redirect // optional custom callback to perform before logout customCallback: false, // set to false for no customCallback // customCallback: function () { // define optional custom js function // perform custom action before logout // }, // configure which activity events to detect // http://www.quirksmode.org/dom/events/ // https://developer.mozilla.org/en-US/docs/Web/Reference/Events activityEvents: 'click keypress scroll wheel mousewheel mousemove', // separate each event with a space // warning dialog box configuration enableDialog: true, // set to false for logout without warning dialog dialogDisplayLimit: 180, // time to display the warning dialog before logout (and optional callback) in seconds. 180 = 3 Minutes dialogTitle: 'Session Expiration Warning', // also displays on browser title bar dialogText: 'Because you have been inactive, your session is about to expire.', dialogTimeRemaining: 'Time remaining', dialogStayLoggedInButton: 'Stay Logged In', dialogLogOutNowButton: 'Log Out Now', // error message errorAlertMessage: 'Please disable "Private Mode", or upgrade to a modern browser. Or perhaps a dependent file missing. Please see: https://github.com/marcuswestin/store.js', // server-side session keep-alive timer sessionKeepAliveTimer: 600, // Ping the server at this interval in seconds. 600 = 10 Minutes // sessionKeepAliveTimer: false, // Set to false to disable pings sessionKeepAliveUrl: window.location.href // set URL to ping - does not apply if sessionKeepAliveTimer: false }

Clone this wiki locally