fix #6 use same parameters than express.session

This commit is contained in:
Jose F. Romaniello
2013-02-05 19:15:04 -03:00
parent a1e46b1fbd
commit 66dd460070
4 changed files with 27 additions and 25 deletions

View File

@@ -21,10 +21,14 @@ Usage
var sio = socketIo.listen(webServer);
//except for the optional fail and success the parameter object has the
//same attribute than the session middleware http://www.senchalabs.org/connect/middleware-session.html
sio.set("authorization", passportSocketIo.authorize({
sessionKey: 'express.sid', //the cookie where express (or connect) stores its session id.
sessionStore: mySessionStore, //the session store that express uses
sessionSecret: "my session secret", //the session secret to parse the cookie
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
},