remove connect and cookie dependency

This commit is contained in:
José F. Romaniello
2013-06-05 08:38:33 -03:00
parent 9fea831500
commit 04ea36fdd3
4 changed files with 39 additions and 22 deletions

View File

@@ -26,11 +26,12 @@ Usage
//same attribute than the session middleware http://www.senchalabs.org/connect/middleware-session.html
sio.set("authorization", passportSocketIo.authorize({
key: 'express.sid', //the cookie where express (or connect) stores its session id.
secret: 'my session secret', //the session secret to parse the cookie
store: mySessionStore, //the session store that express uses
fail: function(data, accept) { // *optional* callbacks on success or fail
accept(null, false); // second param takes boolean on whether or not to allow handshake
cookieParser: express.cookieParser, //or connect.cookieParser
key: 'express.sid', //the cookie where express (or connect) stores its session id.
secret: 'my session secret', //the session secret to parse the cookie
store: mySessionStore, //the session store that express uses
fail: function(data, accept) { // *optional* callbacks on success or fail
accept(null, false); // second param takes boolean on whether or not to allow handshake
},
success: function(data, accept) {
accept(null, true);