cookie handler middleware for em-session-manager
JavaScript
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
lib
.gitignore
LICENCE
README.md
index.js
package.json
test.js

README.md

em-session-identity-cookie

manages cookies on http requests, is a middleware for em-sesion-manager. cookies contain only the sessoin id which is created from 20 bytes hex encoded true random data.

installation

npm install em-session-identity-cookie

usage

var CookieIdentity = require( "em-session-identity-cookie" );

var mySessionIds = new CookieIdentity( {
	  host: 	"eventemitter.com"  	// optional, cookie is only set on responses for this host
	, path: 	"/" 					// optional
	, secure: 	true					// optional
	, httpOnly: true					// optional
	, ttl: 		3600 * 24 * 365 * 20 	// optional, cookies are valid 20 years. not set = cookie gets deleted when the browser is closed
} );


sessionManager.setIdentityManager( mySessionIds );