mod_auth_external/mod_auth_external.lua
changeset 3664 11cd6e034fd3
parent 3392 c458f940b011
equal deleted inserted replaced
3663:bb8a6df5ecba 3664:11cd6e034fd3
    28 	"Config error: external_auth_protocol must be 'ejabberd' or 'generic'");
    28 	"Config error: external_auth_protocol must be 'ejabberd' or 'generic'");
    29 assert(not host:find(":"), "Invalid hostname");
    29 assert(not host:find(":"), "Invalid hostname");
    30 
    30 
    31 
    31 
    32 if not blocking then
    32 if not blocking then
       
    33 	assert(server.event, "External auth non-blocking mode requires libevent installed and enabled");
    33 	log("debug", "External auth in non-blocking mode, yay!")
    34 	log("debug", "External auth in non-blocking mode, yay!")
    34 	waiter, guard = async.waiter, async.guarder();
    35 	waiter, guard = async.waiter, async.guarder();
    35 elseif auth_processes > 1 then
    36 elseif auth_processes > 1 then
    36 	log("warn", "external_auth_processes is greater than 1, but we are in blocking mode - reducing to 1");
    37 	log("warn", "external_auth_processes is greater than 1, but we are in blocking mode - reducing to 1");
    37 	auth_processes = 1;
    38 	auth_processes = 1;