[
  {
    "path": ".gitignore",
    "content": "/bower_components/\n/node_modules/\n*.sublime-project\n*.sublime-workspace\n"
  },
  {
    "path": ".jshintrc",
    "content": "{\n  \"curly\": true,\n  \"eqeqeq\": true,\n  \"immed\": true,\n  \"latedef\": true,\n  \"newcap\": true,\n  \"noarg\": true,\n  \"sub\": true,\n  \"undef\": true,\n  \"unused\": true,\n  \"boss\": true,\n  \"eqnull\": true,\n  \"node\": true,\n  \"globals\": {\n    \"document\": true,\n    \"window\": true,\n    \"jQuery\": true,\n    \"$\": true\n  }\n}\n"
  },
  {
    "path": "Gruntfile.js",
    "content": "'use strict';\n\nmodule.exports = function(grunt) {\n    // Show elapsed time at the end\n    require('time-grunt')(grunt);\n    // Load all grunt tasks\n    require('load-grunt-tasks')(grunt);\n\n    // Project configuration.\n    grunt.initConfig({\n        connect: {\n            options: {\n                port: 9000,\n                // Enable hostname '0.0.0.0' to access the server from outside.\n                hostname: '0.0.0.0',\n                livereload: 36729\n            },\n            livereload: {\n                options: {\n                    open: 'http://localhost:9000',\n                    middleware: function(connect) {\n                        return [\n                            connect.static('./')\n                        ];\n                    }\n                }\n            }\n        },\n        jshint: {\n            options: {\n                jshintrc: '.jshintrc',\n                reporter: require('jshint-stylish')\n            },\n            dist: {\n                src: ['dist/bootstrap-session-timeout.js']\n            }\n        },\n        watch: {\n            dist: {\n                files: '<%= jshint.dist.src %>',\n                tasks: ['jshint:dist']\n            },\n            livereload: {\n                options: {\n                    livereload: '<%= connect.options.livereload %>'\n                },\n                files: [\n                    '*.html',\n                    'examples/*.html',\n                    'dist/*.js'\n                ]\n            }\n        },\n        uglify: {\n            dist: {\n                files: {\n                    'dist/bootstrap-session-timeout.min.js': ['<%= jshint.dist.src %>']\n                }\n            }\n        }\n    });\n\n    // Default task.\n    grunt.registerTask('default', ['jshint']);\n    grunt.registerTask('dev', ['connect:livereload', 'watch']);\n    grunt.registerTask('min', ['jshint', 'uglify']);\n};\n"
  },
  {
    "path": "LICENSE.md",
    "content": "MIT License (MIT)\n\nCopyright (c) 2013 Travis Horn\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in\nall copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN\nTHE SOFTWARE.\n\n"
  },
  {
    "path": "README.md",
    "content": "# bootstrap-session-timeout\nInspired by [jquery-sessionTimeout-bootstrap by maxfierke](https://github.com/maxfierke/jquery-sessionTimeout-bootstrap)\n\nThere have been a number of major upgrades. For example, as long as the user is doing something on the page, he will never get a timeout. The original plugin launched a timeout warning dialog in a fixed amount of time regardless of user activity. See description and documentation for more information.\n\nYou can easily upgrade from jquery-sessionTimeout-bootstrap to bootstrap-session-timeout, since the basic options have been inherited from jquery-sessionTimeout-bootstrap and have not been renamed.\n\n## Description\nAfter a set amount of idle time, a Bootstrap warning dialog is shown to the user with the option to either log out, or stay connected. If \"Logout\" button is selected, the page is redirected to a logout URL. If \"Stay Connected\" is selected the dialog closes and the session is kept alive. If no option is selected after another set amount of idle time, the page is automatically redirected to a set timeout URL.\n\nIdle time is defined as no mouse, keyboard or touch event activity registered by the browser.\n\nAs long as the user is active, the (optional) keep-alive URL keeps getting pinged and the session stays alive. If you have no need to keep the server-side session alive via the keep-alive URL, you can also use this plugin as a simple lock mechanism that redirects to your lock-session or log-out URL after a set amount of idle time.\n\n\n## Getting Started\n\n1. Download or git clone.\n2. Run `bower install` to install dependencies or if you prefer to do it manually: include jQuery, Bootstrap JS and CSS (required if you want to use Bootstrap modal window).\n3. Include `bootstrap-session-timeout.js` or the minified version `bootstrap-session-timeout.min.js`\n4. Call `$.sessionTimeout();` on document ready. See available options below or take a look at the examples.\n\n\n\n## Documentation\n### Options\n**title**<br>\n\nType: `String`\n\nDefault: `'Your session is about to expire!'`\n\nThis is the text shown to user via Bootstrap warning dialog after warning period. (modal title)\n\n**message**<br>\n\nType: `String`\n\nDefault: `'Your session is about to expire.'`\n\nThis is the text shown to user via Bootstrap warning dialog after warning period.\n\n**logoutButton**<br>\n\nType: `String`\n\nDefault: `'Logout'`\n\nThis is the text shown to user via Bootstrap warning dialog after warning period in the logout button.\n\n**keepAliveButton**<br>\n\nType: `String`\n\nDefault: `'Stay Connected'`\n\nThis is the text shown to user via Bootstrap warning dialog after warning period in the Keep Alive button.\n\n**keepAliveUrl**\n\nType: `String`\n\nDefault: `'/keep-alive'`\n\nURL to ping via AJAX POST to keep the session alive. This resource should do something innocuous that would keep the session alive, which will depend on your server-side platform.\n\n**keepAlive**\n\nType: `Boolean`\n\nDefault: `true`\n\nIf `true`, the plugin keeps pinging the `keepAliveUrl` for as long as the user is active. The time between two pings is set by the `keepAliveInterval` option. If you have no server-side session timeout to worry about, feel free to set this one to `false` to prevent unnecessary network activity.\n\n**keepAliveInterval**\n\nType: `Integer`\n\nDefault: `5000` (5 seconds)\n\nTime in milliseconds between two keep-alive pings.\n\n**ajaxType**\n\nType: `String`\n\nDefault: `'POST'`\n\nIf you need to specify the ajax method\n\n**ajaxData**\n\nType: `String`\n\nDefault: `''`\n\nIf you need to send some data via AJAX POST to your `keepAliveUrl`, you can use this option.\n\n**redirUrl**\n\nType: `String`\n\nDefault: `'/timed-out'`\n\nURL to take browser to if no action is take after the warning.\n\n**logoutUrl**\n\nType: `String`\n\nDefault: `'/log-out'`\n\nURL to take browser to if user clicks \"Logout\" on the Bootstrap warning dialog.\n\n**warnAfter**\n\nType: `Integer`\n\nDefault: `900000` (15 minutes)\n\nTime in milliseconds after page is opened until warning dialog is opened.\n\n**redirAfter**\n\nType: `Integer`\n\nDefault: `1200000` (20 minutes)\n\nTime in milliseconds after page is opened until browser is redirected to `redirUrl`.\n\n**ignoreUserActivity**\n\nType: `Boolean`\n\nDefault: `false`\n\nIf `true`, this will launch the Bootstrap warning dialog / redirect (or callback functions) in a set amounts of time regardless of user activity. This in turn makes the plugin act much like the [jquery-sessionTimeout-bootstrap by maxfierke](https://github.com/maxfierke/jquery-sessionTimeout-bootstrap) plugin.\n\n**countdownSmart**\n\nType: `Boolean`\n\nDefault: `false`\n\nIf `true`, displays minutes as well as seconds in the countdown timer (e.g. \"3m 14s\").\nDisplays only seconds when timer is under one minute (e.g. \"42s\").\n\n**countdownMessage**\n\nType: `String` or `Boolean`\n\nDefault: `false`\n\nIf you want a custom sentence to appear in the warning dialog with a timer showing the seconds remaining, use this option. Example: `countdownMessage: 'Redirecting in {timer}.'` Place the `{timer}` string where you want the numeric countdown to appear. Another example: `countdownMessage: '{timer} remaining.'`. Can be combined with countdownBar option or used independently.\n\n**countdownBar**\n\nType: `Boolean`\n\nDefault: `false`\n\nIf `true`, ads a countdown bar (uses Bootstrap progress bar) to the warning dialog. Can be combined with countdownMessage option or used independently.\n\n**onStart**\n\nType: `Function` or `Boolean`\n\nDefault: `false`\n\nOptional callback fired when first calling the plugin and every time user refreshes the session (on any mouse, keyboard or touch action). Takes options object as the only argument.\n\n\n**onWarn**\n\nType: `Function` or `Boolean`\n\nDefault: `false`\n\nCustom callback you can use instead of showing the Bootstrap warning dialog. Takes options object as the only argument.\n\nRedirect action will still occur unless you also add the `onRedir` callback.\n\n**onRedir**\n\nType: `Function` or `Boolean`\n\nDefault: `false`\n\nCustom callback you can use instead of redirecting the user to `redirUrl`. Takes options object as the only argument.\n\n## Examples\n\nYou can play around with the examples in the `/examples` directory.\n\n\n**Basic Usage**\n\nShows the warning dialog after one minute. The dialog is visible for another minute. If user takes no action (interacts with the page in any way), browser is redirected to `redirUrl`. On any user action (mouse, keyboard or touch) the timeout timer is reset. Of course, you will still need to close the dialog.\n\n```js\n$.sessionTimeout({\n\tmessage: 'Your session will be locked in one minute.',\n\tkeepAliveUrl: 'keep-alive.html',\n\tlogoutUrl: 'login.html',\n\tredirUrl: 'locked.html',\n\twarnAfter: 60000,\n\tredirAfter: 120000\n});\n```\n\n**With onWarn Callback**\n\nShows the \"Warning!\" alert after one minute. If user takes no action (interacts with the page in any way), after one more minute the browser is redirected to `redirUrl`. On any user action (mouse, keyboard or touch) the timeout timer is reset.\n\n```js\n$.sessionTimeout({\n\tredirUrl: 'locked.html',\n\twarnAfter: 60000,\n\tredirAfter: 120000,\n\tonWarn: function () {\n\t\talert('Warning!');\n\t}\n});\n```\n\n**With both onWarn and onRedir Callback**\n\nConsole logs the \"Your session will soon expire!\" text after one minute. If user takes no action (interacts with the page in any way), after two more minutes the \"Your session has expired!\" alert gets shown. No redirection occurs. On any user action (mouse, keyboard or touch) the timeout timer is reset.\n\n```js\n$.sessionTimeout({\n\twarnAfter: 60000,\n\tredirAfter: 180000,\n\tonWarn: function () {\n\t\tconsole.log('Your session will soon expire!');\n\t},\n\tonRedir: function () {\n\t\talert('Your session has expired!');\n\t}\n});\n```\n\n**With countdown message and bar displayed in warning dialog**\n\nSame as basic usage except you'll also see the countdown message and countdown bar in the warning dialog. Uses Bootstrap progress bar. In countdownMessage place the `{timer}` string where you want the numeric countdown (seconds) to appear.\n\n```js\n$.sessionTimeout({\n    keepAliveUrl: 'keep-alive.html',\n    logoutUrl: 'login.html',\n    redirUrl: 'locked.html',\n    warnAfter: 60000,\n\tredirAfter: 120000,\n    countdownMessage: 'Redirecting in {timer} seconds.',\n    countdownBar: true\n});\n```\n\n## Contributing\nIn lieu of a formal styleguide, take care to maintain the existing coding style. Add comments for any new or changed functionality. Lint and test your code using [Grunt](http://gruntjs.com/).\n\n## Release History\n * **1.0.3** `2015-07-17`\n\t * Fixes various reported bugs\n * **1.0.2** `2015-02-10`\n\t * Added optional onStart callback.\n\t * All custom callbacks nowreceive options object as argument. \n\t * Added optional countdown message. Added optional countdown bar.\n * **1.0.1** `2014-01-23`\n\t * Added an option to send data to the keep-alive URL.\n * **1.0.0** `2014-01-22`\n\t * Initial release.\n\n## License\nCopyright (c) 2014 [Orange Hill](http://www.orangehilldev.com). Licensed under the MIT license.\n"
  },
  {
    "path": "bower.json",
    "content": "{\n  \"name\": \"bootstrap-session-timeout\",\n  \"version\": \"1.0.3\",\n  \"homepage\": \"https://github.com/orangehill/bootstrap-session-timeout\",\n  \"authors\": [\n    \"Vedran Opacic <vedran.opacic@orangehilldev.com>\"\n  ],\n  \"description\": \"Session timeout and keep-alive control with a nice Bootstrap warning dialog.\",\n  \"keywords\": [\n    \"timeout\",\n    \"time-out\",\n    \"keepalive\",\n    \"keep-alive\",\n    \"session\",\n    \"bootstrap\",\n    \"bootstrap 3\",\n    \"jquery\",\n    \"javascript\",\n    \"dialog\"\n  ],\n  \"license\": \"MIT\",\n  \"ignore\": [\n    \"node_modules\",\n    \"bower_components\",\n    \"test\",\n    \"tests\"\n  ],\n  \"dependencies\": {\n    \"bootstrap\": \"~3.3.2\",\n    \"jquery\": \"~2.1.3\"\n  }\n}\n"
  },
  {
    "path": "dist/bootstrap-session-timeout.js",
    "content": "/*\n * bootstrap-session-timeout\n * www.orangehilldev.com\n *\n * Copyright (c) 2014 Vedran Opacic\n * Licensed under the MIT license.\n */\n\n(function($) {\n    /*jshint multistr: true */\n    'use strict';\n    $.sessionTimeout = function(options) {\n        var defaults = {\n            title: 'Your Session is About to Expire!',\n            message: 'Your session is about to expire.',\n            logoutButton: 'Logout',\n            keepAliveButton: 'Stay Connected',\n            keepAliveUrl: '/keep-alive',\n            ajaxType: 'POST',\n            ajaxData: '',\n            redirUrl: '/timed-out',\n            logoutUrl: '/log-out',\n            warnAfter: 900000, // 15 minutes\n            redirAfter: 1200000, // 20 minutes\n            keepAliveInterval: 5000,\n            keepAlive: true,\n            ignoreUserActivity: false,\n            onStart: false,\n            onWarn: false,\n            onRedir: false,\n            countdownMessage: false,\n            countdownBar: false,\n            countdownSmart: false\n        };\n\n        var opt = defaults,\n            timer,\n            countdown = {};\n\n        // Extend user-set options over defaults\n        if (options) {\n            opt = $.extend(defaults, options);\n        }\n\n        // Some error handling if options are miss-configured\n        if (opt.warnAfter >= opt.redirAfter) {\n            console.error('Bootstrap-session-timeout plugin is miss-configured. Option \"redirAfter\" must be equal or greater than \"warnAfter\".');\n            return false;\n        }\n\n        // Unless user set his own callback function, prepare bootstrap modal elements and events\n        if (typeof opt.onWarn !== 'function') {\n            // If opt.countdownMessage is defined add a coundown timer message to the modal dialog\n            var countdownMessage = opt.countdownMessage ?\n                '<p>' + opt.countdownMessage.replace(/{timer}/g, '<span class=\"countdown-holder\"></span>') + '</p>' : '';\n            var coundownBarHtml = opt.countdownBar ?\n                '<div class=\"progress\"> \\\n                  <div class=\"progress-bar progress-bar-striped countdown-bar active\" role=\"progressbar\" style=\"min-width: 15px; width: 100%;\"> \\\n                    <span class=\"countdown-holder\"></span> \\\n                  </div> \\\n                </div>' : '';\n\n            // Create timeout warning dialog\n            $('body').append('<div class=\"modal fade\" id=\"session-timeout-dialog\"> \\\n              <div class=\"modal-dialog\"> \\\n                <div class=\"modal-content\"> \\\n                  <div class=\"modal-header\"> \\\n                    <button type=\"button\" class=\"close\" data-dismiss=\"modal\" aria-hidden=\"true\">&times;</button> \\\n                    <h4 class=\"modal-title\">' + opt.title + '</h4> \\\n                  </div> \\\n                  <div class=\"modal-body\"> \\\n                    <p>' + opt.message + '</p> \\\n                    ' + countdownMessage + ' \\\n                    ' + coundownBarHtml + ' \\\n                  </div> \\\n                  <div class=\"modal-footer\"> \\\n                    <button id=\"session-timeout-dialog-logout\" type=\"button\" class=\"btn btn-default\">' + opt.logoutButton + '</button> \\\n                    <button id=\"session-timeout-dialog-keepalive\" type=\"button\" class=\"btn btn-primary\" data-dismiss=\"modal\">' + opt.keepAliveButton + '</button> \\\n                  </div> \\\n                </div> \\\n              </div> \\\n             </div>');\n\n            // \"Logout\" button click\n            $('#session-timeout-dialog-logout').on('click', function() {\n                window.location = opt.logoutUrl;\n            });\n            // \"Stay Connected\" button click\n            $('#session-timeout-dialog').on('hide.bs.modal', function() {\n                // Restart session timer\n                startSessionTimer();\n            });\n        }\n\n        // Reset timer on any of these events\n        if (!opt.ignoreUserActivity) {\n            var mousePosition = [-1, -1];\n            $(document).on('keyup mouseup mousemove touchend touchmove', function(e) {\n                if (e.type === 'mousemove') {\n                    // Solves mousemove even when mouse not moving issue on Chrome:\n                    // https://code.google.com/p/chromium/issues/detail?id=241476\n                    if (e.clientX === mousePosition[0] && e.clientY === mousePosition[1]) {\n                        return;\n                    }\n                    mousePosition[0] = e.clientX;\n                    mousePosition[1] = e.clientY;\n                }\n                startSessionTimer();\n\n                // If they moved the mouse not only reset the counter\n                // but remove the modal too!\n                if ($('#session-timeout-dialog').length > 0 &&\n                    $('#session-timeout-dialog').data('bs.modal') &&\n                    $('#session-timeout-dialog').data('bs.modal').isShown) {\n                    // http://stackoverflow.com/questions/11519660/twitter-bootstrap-modal-backdrop-doesnt-disappear\n                    $('#session-timeout-dialog').modal('hide');\n                    $('body').removeClass('modal-open');\n                    $('div.modal-backdrop').remove();\n\n                }\n            });\n        }\n\n        // Keeps the server side connection live, by pingin url set in keepAliveUrl option.\n        // KeepAlivePinged is a helper var to ensure the functionality of the keepAliveInterval option\n        var keepAlivePinged = false;\n\n        function keepAlive() {\n            if (!keepAlivePinged) {\n                // Ping keepalive URL using (if provided) data and type from options\n                $.ajax({\n                    type: opt.ajaxType,\n                    url: opt.keepAliveUrl,\n                    data: opt.ajaxData\n                });\n                keepAlivePinged = true;\n                setTimeout(function() {\n                    keepAlivePinged = false;\n                }, opt.keepAliveInterval);\n            }\n        }\n\n        function startSessionTimer() {\n            // Clear session timer\n            clearTimeout(timer);\n            if (opt.countdownMessage || opt.countdownBar) {\n                startCountdownTimer('session', true);\n            }\n\n            if (typeof opt.onStart === 'function') {\n                opt.onStart(opt);\n            }\n\n            // If keepAlive option is set to \"true\", ping the \"keepAliveUrl\" url\n            if (opt.keepAlive) {\n                keepAlive();\n            }\n\n            // Set session timer\n            timer = setTimeout(function() {\n                // Check for onWarn callback function and if there is none, launch dialog\n                if (typeof opt.onWarn !== 'function') {\n                    $('#session-timeout-dialog').modal('show');\n                } else {\n                    opt.onWarn(opt);\n                }\n                // Start dialog timer\n                startDialogTimer();\n            }, opt.warnAfter);\n        }\n\n        function startDialogTimer() {\n            // Clear session timer\n            clearTimeout(timer);\n            if (!$('#session-timeout-dialog').hasClass('in') && (opt.countdownMessage || opt.countdownBar)) {\n                // If warning dialog is not already open and either opt.countdownMessage\n                // or opt.countdownBar are set start countdown\n                startCountdownTimer('dialog', true);\n            }\n            // Set dialog timer\n            timer = setTimeout(function() {\n                // Check for onRedir callback function and if there is none, launch redirect\n                if (typeof opt.onRedir !== 'function') {\n                    window.location = opt.redirUrl;\n                } else {\n                    opt.onRedir(opt);\n                }\n            }, (opt.redirAfter - opt.warnAfter));\n        }\n\n        function startCountdownTimer(type, reset) {\n            // Clear countdown timer\n            clearTimeout(countdown.timer);\n\n            if (type === 'dialog' && reset) {\n                // If triggered by startDialogTimer start warning countdown\n                countdown.timeLeft = Math.floor((opt.redirAfter - opt.warnAfter) / 1000);\n            } else if (type === 'session' && reset) {\n                // If triggered by startSessionTimer start full countdown\n                // (this is needed if user doesn't close the warning dialog)\n                countdown.timeLeft = Math.floor(opt.redirAfter / 1000);\n            }\n            // If opt.countdownBar is true, calculate remaining time percentage\n            if (opt.countdownBar && type === 'dialog') {\n                countdown.percentLeft = Math.floor(countdown.timeLeft / ((opt.redirAfter - opt.warnAfter) / 1000) * 100);\n            } else if (opt.countdownBar && type === 'session') {\n                countdown.percentLeft = Math.floor(countdown.timeLeft / (opt.redirAfter / 1000) * 100);\n            }\n            // Set countdown message time value\n            var countdownEl = $('.countdown-holder');\n            var secondsLeft = countdown.timeLeft >= 0 ? countdown.timeLeft : 0;\n            if (opt.countdownSmart) {\n                var minLeft = Math.floor(secondsLeft / 60);\n                var secRemain = secondsLeft % 60;\n                var countTxt = minLeft > 0 ? minLeft + 'm' : '';\n                if (countTxt.length > 0) {\n                    countTxt += ' ';\n                }\n                countTxt += secRemain + 's';\n                countdownEl.text(countTxt);\n            } else {\n                countdownEl.text(secondsLeft + \"s\");\n            }\n\n            // Set countdown message time value\n            if (opt.countdownBar) {\n                $('.countdown-bar').css('width', countdown.percentLeft + '%');\n            }\n\n            // Countdown by one second\n            countdown.timeLeft = countdown.timeLeft - 1;\n            countdown.timer = setTimeout(function() {\n                // Call self after one second\n                startCountdownTimer(type);\n            }, 1000);\n        }\n\n        // Start session timer\n        startSessionTimer();\n\n    };\n})(jQuery);\n"
  },
  {
    "path": "examples/basic.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Basic Usage</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Basic Usage</h2>\n        <hr>\n        <p>Shows the warning dialog after 3 seconds. If user takes no action (interacts with the page in any way), browser is redirected to redirUrl. On any user action (mouse, keyboard or touch) the timeout timer is reset. </p>\n\n        <pre>\n            $.sessionTimeout({\n                keepAliveUrl: 'keep-alive.html',\n                logoutUrl: 'login.html',\n                redirUrl: 'locked.html',\n                warnAfter: 3000,\n                redirAfter: 10000\n            });\n        </pre>\n\n        <a class=\"btn btn-primary\" href=\"../index.html\" role=\"button\">Back to Demo Index</a>\n\n    </div>\n    <script src=\"../bower_components/jquery/dist/jquery.min.js\"></script>\n    <script src=\"../bower_components/bootstrap/dist/js/bootstrap.min.js\"></script>\n    <script src=\"../dist/bootstrap-session-timeout.js\"></script>\n\n    <script>\n    $.sessionTimeout({\n        keepAliveUrl: 'keep-alive.html',\n        logoutUrl: 'login.html',\n        redirUrl: 'locked.html',\n        warnAfter: 3000,\n        redirAfter: 10000\n    });\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/countdown-bar.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Countdown Timer</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Countdown Timer</h2>\n        <hr>\n        <p>Shows the warning dialog with countdown bar after 3 seconds. If user takes no action (interacts with the page in any way), browser is redirected to redirUrl. On any user action (mouse, keyboard or touch) the timeout timer as well as the countdown timer are reset (visible if you don't close the warning dialog). </p>\n        <p>Note: you can also combine the countdown bar with a <a href=\"countdown-timer.html\">countdown timer message</a>.</p>\n\n        <pre>\n            $.sessionTimeout({\n                keepAliveUrl: 'keep-alive.html',\n                logoutUrl: 'login.html',\n                redirUrl: 'locked.html',\n                warnAfter: 3000,\n                redirAfter: 10000,\n                countdownBar: true\n            });\n        </pre>\n\n        <a class=\"btn btn-primary\" href=\"../index.html\" role=\"button\">Back to Demo Index</a>\n\n    </div>\n    <script src=\"../bower_components/jquery/dist/jquery.min.js\"></script>\n    <script src=\"../bower_components/bootstrap/dist/js/bootstrap.min.js\"></script>\n    <script src=\"../dist/bootstrap-session-timeout.js\"></script>\n\n    <script>\n    $.sessionTimeout({\n        keepAliveUrl: 'keep-alive.html',\n        logoutUrl: 'login.html',\n        redirUrl: 'locked.html',\n        warnAfter: 3000,\n        redirAfter: 10000,\n        countdownBar: true\n    });\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/countdown-timer.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Countdown Timer</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Countdown Timer</h2>\n        <hr>\n        <p>Shows the warning dialog with countdown timer after 3 seconds. If user takes no action (interacts with the page in any way), browser is redirected to redirUrl. On any user action (mouse, keyboard or touch) the timeout timer as well as the countdown timer are reset (visible if you don't close the warning dialog). </p>\n\n        <pre>\n            $.sessionTimeout({\n                keepAliveUrl: 'keep-alive.html',\n                logoutUrl: 'login.html',\n                redirUrl: 'locked.html',\n                warnAfter: 3000,\n                redirAfter: 10000,\n                countdownMessage: 'Redirecting in {timer} seconds.'\n            });\n        </pre>\n\n        <a class=\"btn btn-primary\" href=\"../index.html\" role=\"button\">Back to Demo Index</a>\n\n    </div>\n    <script src=\"../bower_components/jquery/dist/jquery.min.js\"></script>\n    <script src=\"../bower_components/bootstrap/dist/js/bootstrap.min.js\"></script>\n    <script src=\"../dist/bootstrap-session-timeout.js\"></script>\n\n    <script>\n    $.sessionTimeout({\n        keepAliveUrl: 'keep-alive.html',\n        logoutUrl: 'login.html',\n        redirUrl: 'locked.html',\n        warnAfter: 3000,\n        redirAfter: 10000,\n        countdownMessage: 'Redirecting in {timer} seconds.'\n    });\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/custom-callback.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Countdown Timer</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Custom Callback</h2>\n        <hr>\n        <p>Shows an example of using custom callback functions for warning and redirect.</p>\n        <div class=\"jumbotron\" style=\"background: #398439;\">\n            <h3>Session Status:</h3>\n            <p class=\"hidden\" id=\"fine\">Session is fine.</p>\n            <p class=\"hidden\" id=\"warn\">Warning: session will expire in less than 17 seconds.</p>\n        </div>\n\n\n        <pre>\n            $.sessionTimeout({\n                keepAliveUrl: 'keep-alive.html',\n                logoutUrl: 'login.html',\n                warnAfter: 3000,\n                redirAfter: 20000,\n                onStart: function () {\n                    $('.jumbotron').css('background', '#398439').find('p').addClass('hidden');\n                    $('#fine').removeClass('hidden')\n                },\n                onWarn: function () {\n                    $('.jumbotron').css('background', '#b92c28').find('p').addClass('hidden');\n                    $('#warn').removeClass('hidden')\n                },\n                onRedir: function (opt) {\n                    window.location = opt.logoutUrl;\n                }\n            });\n        </pre>\n\n        <a class=\"btn btn-primary\" href=\"../index.html\" role=\"button\">Back to Demo Index</a>\n\n    </div>\n    <script src=\"../bower_components/jquery/dist/jquery.min.js\"></script>\n    <script src=\"../bower_components/bootstrap/dist/js/bootstrap.min.js\"></script>\n    <script src=\"../dist/bootstrap-session-timeout.js\"></script>\n\n    <script>\n    $.sessionTimeout({\n        keepAliveUrl: 'keep-alive.html',\n        logoutUrl: 'login.html',\n        warnAfter: 3000,\n        redirAfter: 20000,\n        onStart: function () {\n            $('.jumbotron').css('background', '#398439').find('p').addClass('hidden');\n            $('#fine').removeClass('hidden');\n        },\n        onWarn: function () {\n            $('.jumbotron').css('background', '#b92c28').find('p').addClass('hidden');\n            $('#warn').removeClass('hidden');\n        },\n        onRedir: function (opt) {\n            window.location = opt.logoutUrl;\n        }\n    });\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/keep-alive.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Basic Usage</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Dummy keep alive URL</h2>\n        <hr>\n        <p>This would be your server-side URL to refresh user session.</p>\n    </div>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/locked.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Logged Out</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Logged Out</h2>\n        <hr>\n        <p>You have been redirected to a logout URL.</p>\n\n        <input onclick=\"backClick()\" class=\"btn btn-primary\" type=\"button\" value=\"Back to Example\">\n\n    </div>\n    <script>\n    function backClick() {\n        window.history.back()\n    }\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "examples/login.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Login Page</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"../bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout</h1>\n        <h2>Login</h2>\n        <hr>\n        <p>This would be your login page.</p>\n\n        <input onclick=\"backClick()\" class=\"btn btn-primary\" type=\"button\" value=\"Back to Example\">\n\n    </div>\n    <script>\n    function backClick() {\n        window.history.back()\n    }\n    </script>\n</body>\n\n</html>\n"
  },
  {
    "path": "index.html",
    "content": "<!DOCTYPE html>\n<html>\n\n<head>\n    <title>Bootstrap-session-timeout - Basic Usage</title>\n    <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n    <link rel=\"stylesheet\" href=\"bower_components/bootstrap/dist/css/bootstrap.min.css\">\n</head>\n\n<body>\n    <div class=\"container\">\n        <h1>Bootstrap-session-timeout demo</h1>\n        <hr>\n        <a class=\"btn btn-primary\" href=\"examples/basic.html\" role=\"button\">Basic Demo</a>\n        <hr>\n        <a class=\"btn btn-primary\" href=\"examples/countdown-timer.html\" role=\"button\">Countdown Message Demo</a>\n        <hr>\n        <a class=\"btn btn-primary\" href=\"examples/countdown-bar.html\" role=\"button\">Countdown Bar Demo</a>\n        <hr>\n        <a class=\"btn btn-primary\" href=\"examples/custom-callback.html\" role=\"button\">Custom Callback Demo</a>\n        <hr>\n    </div>\n</body>\n\n</html>\n"
  },
  {
    "path": "package.json",
    "content": "{\n  \"name\": \"bootstrap-session-timeout\",\n  \"version\": \"1.0.3\",\n  \"main\": \"dist/bootstrap-session-timeout.js\",\n  \"description\": \"Session timeout and keep-alive control with a nice Bootstrap warning dialog.\",\n  \"homepage\": \"https://github.com/orangehill/bootstrap-session-timeout\",\n  \"bugs\": \"https://github.com/orangehill/bootstrap-session-timeout/issues\",\n  \"author\": \"Vedran Opacic, vedran.opacic@orangehilldev.com\",\n  \"repository\": {\n    \"type\": \"git\",\n    \"url\": \"https://github.com/orangehill/bootstrap-session-timeout\"\n  },\n  \"licenses\": [\n    {\n      \"type\": \"MIT\"\n    }\n  ],\n  \"keywords\": [\n    \"timeout\",\n    \"time-out\",\n    \"keepalive\",\n    \"keep-alive\",\n    \"session\",\n    \"bootstrap\",\n    \"bootstrap 3\",\n    \"jquery\",\n    \"javascript\",\n    \"dialog\"\n  ],\n  \"devDependencies\": {\n    \"bower\": \"^1.3.5\",\n    \"grunt-contrib-connect\": \"*\",\n    \"grunt-contrib-jshint\": \"~0.7.0\",\n    \"grunt-contrib-uglify\": \"~0.3.1\",\n    \"grunt-contrib-watch\": \"~0.5.0\",\n    \"jshint-stylish\": \"~0.1.3\",\n    \"load-grunt-tasks\": \"~0.2.0\",\n    \"time-grunt\": \"~0.2.0\"\n  }\n}\n"
  }
]