Permalink
Browse files

Merge pull request #12 from srajbr/patch-1

User authentication
  • Loading branch information...
2 parents 7f03f98 + 0142fd1 commit 98736d056cdfe06fadfb3889084b190435160202 @srajbr srajbr committed Jun 10, 2014
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/server.js
View
@@ -41,7 +41,7 @@ exports.run = function(config, ready) {
client.on("authenticate", function(opts, cb) {
User.find(opts.jid, function(user) {
if (user && user.attrs.password === opts.password)
- cb();
+ cb(null, opts);
else
cb(new Error("Authentication failure"));
});

0 comments on commit 98736d0

Please sign in to comment.