New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

connect-redsess

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

connect-redsess

Redis session middleware for Connect/Express using Redsess

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created
Source

connect-redsess Build status

Redis session middleware for Connect/Express using Redsess.

Installation

npm install connect-redsess

Usage

var connect = require('connect');
var connectRedsess = require('connect-redsess');
var app = connect();

app.use(connectRedsess());

By default, the middleware will set the Redsess object onto req.session.

req.session.get('auth', function (err, auth) {
  if (!auth) {
    // redirect to login page
  } else {
    // validate
  }
});

Constructor Options

connectRedsess(options);

Pass an object to connect-redsess on instantiation with any of Redsess' options as well as the following addition(s):

  • requestKey String The key at which to attach the Redsess object onto the req object. Defaults to session.

req.redsessOptions

You may also attach an object onto the req at req.redsessOptions with the same options as above. This is useful for any options that are set per-request (cookies, token, etc.). These will override any previously set.

req.redsessOptions = {
  cookies: req.cookies
};

Keywords

FAQs

Package last updated on 05 Feb 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc