Node.js seems to have a knack for acquiring useful modules with insufficient or no documentation. socket.io is one such module. I would like to use the built-in authorization feature, for namespaces, but I don't know how that would work, on the client-side. Server side, they provide sufficient documentation, but beyond that I'm not sure.
EDIT: I don't want to know how to get cookie data from the client--I know how to do that, but rather how to directly pass data (e.g. username & password) from the client, via javascript.
There's plenty of decent documentation regarding Authorization with Socket.IO: https://github.com/LearnBoost/socket.io/wiki/Authorizing (scroll down to "Namespace authorization" and "How does the client handle the global authorization")
What specifically are you trying to achieve? It sounds a little like you're trying to "POST" a username/password via Socket.IO. Socket.IO auth happens during the handshake phase, so you could feasibly do the following:
"Emit" a username/password combination (hope you're using TLS) after a generic authorization and disconnect the user after a bad auth (Pretty mediocre approach IMO)
Rely on server-side session information for auth instead. This is probably the desired approach as your server-side handshakeData should contain everything you need to figure out if a user is auth-ed or not. It'd behoove you to rely on authenticating an HTTP session prior to connecting to socket so that you're not transmitting a username/password combination every time you try to connect to socket.io (which could feasibly be a lot if you fall back on XHR). There are quite a few articles about this but here's a good start: http://www.danielbaulig.de/socket-ioexpress/