Git Product home page Git Product logo

node-redis-rotatingkey-session's Introduction

node-redis-rotatingkey-session

description

Install

$ npm install node-redis-rotatingkey-session --no-optional

API

Setup your redis server.

$ redis-server start
$ redis-cli
redis> LPUSH keygrip "110E8400-E29B-11D4-A716-446655440000"

Then create a simple express app.

var express = require('express');
var rrkSession = require('redis-rotatingkey-session');

var app = express();

app.use(rrksess({
  // TODO - options
}));

app.listen(3000);

Options

  • name - The cookie name. Defaults to rrksess.
  • keys - Name of Redis key which holds the list of rotating keys. Defaults to keygrip.
  • port - Port on which redis resides. Defaults to 6379.
  • domain - Domain on which redis resides. Defaults to localhost.
  • pass - Redis password. Defaults to none (null).
  • expiry - How long before expiring session. Defaults to 604800 or 1 week.
  • expireExtend - Extend session for expiry length if user is active in the last x amount of time. Defaults to 3600 or 1 hour.

Optional Dependencies

To install optional hiredis for speedier transactions (not really that helpful in this case) you can run npm install redis-rotatingkey-session. However, this may require that you point npm to >=python2.6 for compilation. To do this, run npm config set python /path/to/python2.

node-redis-rotatingkey-session's People

Contributors

blitzrk avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.