From 2d257bfb1ee3e9aa60abc8ffff73c848fb150ffd Mon Sep 17 00:00:00 2001 From: Screeny Date: Fri, 15 Nov 2013 15:54:47 +0100 Subject: [PATCH] Update README.md --- README.md | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index d1d329c..6beda21 100644 --- a/README.md +++ b/README.md @@ -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.