comparison mod_auth_ldap/mod_auth_ldap.lua @ 1987:6d7699eda594

mod_auth_ldap: Change default of ldap_scope from onelevel to subtree which seems to match many deployments
author Kim Alvefur <zash@zash.se>
date Sun, 20 Dec 2015 21:55:49 +0100
parents 770236ea9678
children e16593e7d482
comparison
equal deleted inserted replaced
1986:9e268b4fba08 1987:6d7699eda594
7 -- Config options 7 -- Config options
8 local ldap_server = module:get_option_string("ldap_server", "localhost"); 8 local ldap_server = module:get_option_string("ldap_server", "localhost");
9 local ldap_rootdn = module:get_option_string("ldap_rootdn", ""); 9 local ldap_rootdn = module:get_option_string("ldap_rootdn", "");
10 local ldap_password = module:get_option_string("ldap_password", ""); 10 local ldap_password = module:get_option_string("ldap_password", "");
11 local ldap_tls = module:get_option_boolean("ldap_tls"); 11 local ldap_tls = module:get_option_boolean("ldap_tls");
12 local ldap_scope = module:get_option_string("ldap_scope", "onelevel"); 12 local ldap_scope = module:get_option_string("ldap_scope", "subtree");
13 local ldap_filter = module:get_option_string("ldap_filter", "(uid=$user)"):gsub("%%s", "$user", 1); 13 local ldap_filter = module:get_option_string("ldap_filter", "(uid=$user)"):gsub("%%s", "$user", 1);
14 local ldap_base = assert(module:get_option_string("ldap_base"), "ldap_base is a required option for ldap"); 14 local ldap_base = assert(module:get_option_string("ldap_base"), "ldap_base is a required option for ldap");
15 local ldap_mode = module:get_option_string("ldap_mode", "bind"); 15 local ldap_mode = module:get_option_string("ldap_mode", "bind");
16 local host = ldap_filter_escape(module:get_option_string("realm", module.host)); 16 local host = ldap_filter_escape(module:get_option_string("realm", module.host));
17 17