我在 ubuntu 12.04 上安装了 mod_auth_external 0.8.2,但它不起作用。我安装了,external_auth_command = "/home/yang/chat/testing"
但它没有被调用。我启用了调试日志记录,但没有看到该 mod 的消息。有什么帮助吗?
我使用的是 Candy 示例客户端。提交登录请求后写入日志的内容如下(错误日志中没有任何内容):
Oct 24 21:02:43 socket debug server.lua: accepted new client connection from 127.0.0.1:40527 to 5280
Oct 24 21:02:43 mod_bosh debug BOSH body open (sid: %s)
Oct 24 21:02:43 boshb344ba85-fbf5-4a26-b5f5-5bd35d5ed372 debug BOSH session created for request from 169.254.11.255
Oct 24 21:02:43 mod_bosh info New BOSH session, assigned it sid 'b344ba85-fbf5-4a26-b5f5-5bd35d5ed372'
Oct 24 21:02:43 httpserver debug Sending response to bf9120
Oct 24 21:02:43 httpserver debug Destroying request bf9120
Oct 24 21:02:43 httpserver debug Request has destroy callback
Oct 24 21:02:43 socket debug server.lua: closed client handler and removed socket from list
Oct 24 21:02:43 mod_bosh debug Session b344ba85-fbf5-4a26-b5f5-5bd35d5ed372 has 0 out of 1 requests open
Oct 24 21:02:43 mod_bosh debug and there are 0 things in the send_buffer
Oct 24 21:02:43 socket debug server.lua: accepted new client connection from 127.0.0.1:40528 to 5280
Oct 24 21:02:43 mod_bosh debug BOSH body open (sid: b344ba85-fbf5-4a26-b5f5-5bd35d5ed372)
Oct 24 21:02:43 mod_bosh debug Session b344ba85-fbf5-4a26-b5f5-5bd35d5ed372 has 1 out of 1 requests open
Oct 24 21:02:43 mod_bosh debug and there are 0 things in the send_buffer
Oct 24 21:02:43 mod_bosh debug Have nothing to say, so leaving request unanswered for now
Oct 24 21:02:43 httpserver debug Request c295d0 left open, on_destroy is function(mod_bosh.lua:81)
这是我添加的配置:
modules_enabled = {
...
"bosh"; -- Enable BOSH clients, aka "Jabber over HTTP"
...
}
authentication = "external"
external_auth_protocol = "generic"
external_auth_command = "/home/yang/chat/testing"
答案1
经过一段时间的调试,问题似乎源于 prosody(身份验证 = '外部')不再使用一组身份验证机制来响应初始连接尝试,而 Candy 反过来需要这些身份验证机制才能使用有意义的身份验证节进行响应(并且由于某种原因,其他客户端(如 SleekXMPP)不需要)。