I'm working on a Node.js application where pretty much all the communication is taking place via sockets.io.
What I need to do is, before processing any request (other than the login request) ensure that the user is authenticated.
The obvious way to do this would be to have a catch-all listener which is called prior to the execution of any method.
I can't seem to find anything like this in Socket.io, though. How can I achieve is? Is there a better approach than the one I'm taking?