diff --git a/lib/index.js b/lib/index.js index f58bdad..46d4d66 100644 --- a/lib/index.js +++ b/lib/index.js @@ -137,7 +137,7 @@ function authorize(options, onConnection) { return function(socket, accept){ var token, error; - var handshake = data.handshake; + var handshake = socket.handshake; var req = socket.request || socket; var authorization_header = (req.headers || {}).authorization;