Mercurial > prosody-modules
comparison mod_auth_external/mod_auth_external.lua @ 3389:c458f940b011
mod_auth_external: Use blocking mode by default as non-blocking is experimental but available in 0.11.x
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Sat, 01 Dec 2018 15:22:49 +0100 |
parents | 3fb5f173f213 |
children | 11cd6e034fd3 |
comparison
equal
deleted
inserted
replaced
3387:c5e8042b174c | 3389:c458f940b011 |
---|---|
19 local host = module.host; | 19 local host = module.host; |
20 | 20 |
21 local script_type = module:get_option_string("external_auth_protocol", "generic"); | 21 local script_type = module:get_option_string("external_auth_protocol", "generic"); |
22 local command = module:get_option_string("external_auth_command", ""); | 22 local command = module:get_option_string("external_auth_command", ""); |
23 local read_timeout = module:get_option_number("external_auth_timeout", 5); | 23 local read_timeout = module:get_option_number("external_auth_timeout", 5); |
24 local blocking = module:get_option_boolean("external_auth_blocking", not(have_async and server.event and lpty.getfd)); | 24 local blocking = module:get_option_boolean("external_auth_blocking", true); -- non-blocking is very experimental |
25 local auth_processes = module:get_option_number("external_auth_processes", 1); | 25 local auth_processes = module:get_option_number("external_auth_processes", 1); |
26 | 26 |
27 assert(script_type == "ejabberd" or script_type == "generic", | 27 assert(script_type == "ejabberd" or script_type == "generic", |
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"); |