Skip to content

Commit

Permalink
Merge pull request #12 from srajbr/patch-1
Browse files Browse the repository at this point in the history
User authentication
  • Loading branch information
srajbr committed Jun 10, 2014
2 parents 7f03f98 + 0142fd1 commit 98736d0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/server.js
Original file line number Original file line Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ exports.run = function(config, ready) {
client.on("authenticate", function(opts, cb) { client.on("authenticate", function(opts, cb) {
User.find(opts.jid, function(user) { User.find(opts.jid, function(user) {
if (user && user.attrs.password === opts.password) if (user && user.attrs.password === opts.password)
cb(); cb(null, opts);
else else
cb(new Error("Authentication failure")); cb(new Error("Authentication failure"));
}); });
Expand Down

0 comments on commit 98736d0

Please sign in to comment.