fix #6 use same parameters than express.session
This commit is contained in:
10
README.md
10
README.md
@@ -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
|
||||
},
|
||||
|
Reference in New Issue
Block a user