New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

rack-session

Package Overview
Dependencies
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

rack-session

Library to share sessions with Rack web apps

latest
Source
npmnpm
Version
0.0.3
Version published
Maintainers
1
Created
Source

rack-session

rack-session enables to share session attributes among the Rack web application (such as Sinatra, Padrino and Rails) and the node application (Express, Socket.IO, and so on).

Installation

$ npm install rack-session

Example

var socketioAuthorization = require('rack-session').socketioAuthorization;

var config = {
  key: 'rack.session',
  secret: 'YOUR-SESSION-SECRET'
};

var io = require('socket.io').listen(3000);

// create authorization function
io.set('authorization', socketioAuthorization(config, function(handshake, session, callback) {
  this.log.debug(session);
  callback(null, true);
}));

io.sockets.on('connection', function(socket) {
  socket.emit('connection', 'ok!');
});

FAQs

Package last updated on 18 Apr 2013

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