Skip to content
This repository has been archived by the owner on Jan 31, 2019. It is now read-only.

Commit

Permalink
Merge pull request #24 from leopoldjoy/development
Browse files Browse the repository at this point in the history
Fixed code typos throughout README.md
  • Loading branch information
facundoolano committed Feb 20, 2016
2 parents 8b2cc46 + 9eb0804 commit 3a3c590
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ require('socketio-auth')(io, {
//inform the callback of auth success/failure
if (err || !user) return callback(new Error("User not found"));
return callback(null, user.password == password);
}
});
}
});
```
Expand Down Expand Up @@ -61,7 +61,7 @@ function authenticate(socket, data, callback) {
db.findUser('User', {username:username}, function(err, user) {
if (err || !user) return callback(new Error("User not found"));
return callback(null, user.password == password);
}
});
}
```
* `postAuthenticate`: a function to be called after the client is authenticated. It's useful to keep track of the user associated with a client socket:
Expand All @@ -72,7 +72,7 @@ function postAuthenticate(socket, data) {

db.findUser('User', {username:username}, function(err, user) {
socket.client.user = user;
}
});
}
```

Expand Down Expand Up @@ -101,7 +101,7 @@ function authenticate(socket, data, callback) {

//if wrong password err.message will be "Authentication failure"
return callback(null, user.password == data.password);
}
});
}
```

Expand Down

0 comments on commit 3a3c590

Please sign in to comment.