# HG changeset patch # User Waqas Hussain # Date 1349814500 -18000 # Node ID f5d82d6588d4d2c54de9aa510546d5fd72985f1e # Parent fa73a9b9d907bc7200772672f08907bc1fc6610a mod_auth_external: Clarify the protocol a bit more. diff -r fa73a9b9d907 -r f5d82d6588d4 mod_auth_external.wiki --- 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.