jeli.session.management
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

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

Package Sidebar

Install

npm i jeli.session.management

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

21 kB

Total Files

6

Last publish

Collaborators

  • gojecks