authorization with socket.io
问题 I'm attempting to determine how best to authorize (in addition to authenticate) a user to perform a specific task using socket.io. In express, this is fairly straightforward. I first have a login/password form that queries the database to determine if the record exists, and if it does exist, then I attach the User to the req.session data. exports.session = function(req, res){ User.authenticate(req.body.username, req.body.password, function(err, user){ if (user){ req.session.user = user; res