changeset 308:f5d82d6588d4

mod_auth_external: Clarify the protocol a bit more.
author Waqas Hussain <waqas20@gmail.com>
date Wed, 10 Oct 2012 01:28:20 +0500
parents fa73a9b9d907
children 35702f67785f
files mod_auth_external.wiki
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/mod_auth_external.wiki	Wed Oct 10 01:23:33 2012 +0500
+++ b/mod_auth_external.wiki	Wed Oct 10 01:28:20 2012 +0500
@@ -23,8 +23,11 @@
 Prosody executes the given command/script, and sends it queries.
 
 Your auth script should simply read a line from standard input, and write the result to standard output.
+It must do this in a loop, until there's nothing left to read. Prosody can keep sending more lines to the script,
+with a command on each line.
 
 Each command is one line, and the response is expected to be a single line containing "0" for failure or "1" for success.
+Your script must respond with "0" for anything it doesn't understand.
 
 There are three commands used at the moment:
 
@@ -43,8 +46,6 @@
 
 Example: {{{setpass:username:example.com:abc123}}}
 
-Your script must respond with "0" for anything it can't handle.
-
 == ejabberd compatibilty ==
 ejabberd implements a similar protocol. The main difference is that Prosody's protocol is line-based, while ejabberd's is length-prefixed.