jeli.session.management

Session Manager for controlling UI activity

Usage no npm install needed!

<script type="module">
  import jeliSessionManagement from 'https://cdn.skypack.dev/jeli.session.management';
</script>

README

jeli.session.management

This library provides the ability to manage logged in user sessions and activty.

installation

npm install jeli.sesion.management

usuage

typescript

import * as jsession from 'jeli.sesion.management' 

Configure the watch plugin using the provider property, below example are default configurations.

jsession.provder.idleTime = 30 
jsession.provder.timeOutWarn =  15;
jsession.provder.autoReconnect = . true;
jsession.provder.events.push('mouseenter');

Start the sessionWatch service

var watchMan = jsession
      .manager
      .setWatchObject({
        expires_in: <timestamp>,
        expires_at: 7200
      })
      .startWatch(1000);

register a listener

  watchMan
  .on('isIdle', function(){
    // do something
  })

Below are events emitted from sessionManager

  'isIdle', 
  'isAlive', 
  'isIdleEnd', 
  'isTimedOut', 
  'isTimeOutWarn'

please feel free to open any issues found