2
1
mirror of https://github.com/Thream/socketio-jwt.git synced 2024-07-21 09:38:31 +02:00

Update README.md

This commit is contained in:
Screeny 2013-11-15 15:54:47 +01:00
parent b111b3f327
commit 2d257bfb1e

View File

@ -91,9 +91,17 @@ function onAuthorizeFail(data, message, error, accept){
throw new Error(message);
} else {
console.log(message);
accept(null, false); // the same accept-method as above
// the same accept-method as above in the success-callback
accept(null, false);
}
}
// or
// This function accepts every client unless there's an error
function onAuthorizeFail(data, message, error, accept){
console.log(message);
accept(null, !error);
}
```
You can use the `message` parameter for debugging/logging/etc uses.