warden-authorize
Authorize access to socket.io against warden-based sessions.
Installation
npm install warden-authorize
Example usage
// initialize our modulesvar io = server sessionStore = WardenAuth = ; io; { console; // The accept-callback still allows us to decide whether to // accept the connection or not. ;} { console; iferror ;}
Client-side
You have to provide the session-id as a query parameter like this.
socket = io;