# HG changeset patch # User Kim Alvefur # Date 1376572971 -7200 # Node ID 8e3420d485089a5095aff60fbc2dccbbfd617c46 # Parent b9e4d935867c713d6e2a73bc675cff6686731439 mod_auth_ldap: Switch to type-specific get_option variants diff -r b9e4d935867c -r 8e3420d48508 mod_auth_ldap/mod_auth_ldap.lua --- a/mod_auth_ldap/mod_auth_ldap.lua Wed Aug 14 02:38:50 2013 +0100 +++ b/mod_auth_ldap/mod_auth_ldap.lua Thu Aug 15 15:22:51 2013 +0200 @@ -2,11 +2,11 @@ local new_sasl = require "util.sasl".new; local log = require "util.logger".init("auth_ldap"); -local ldap_server = module:get_option("ldap_server") or "localhost"; -local ldap_rootdn = module:get_option("ldap_rootdn") or ""; -local ldap_password = module:get_option("ldap_password") or ""; -local ldap_tls = module:get_option("ldap_tls"); -local ldap_base = assert(module:get_option("ldap_base"), "ldap_base is a required option for ldap"); +local ldap_server = module:get_option_string("ldap_server", "localhost"); +local ldap_rootdn = module:get_option_string("ldap_rootdn", ""); +local ldap_password = module:get_option_string("ldap_password", ""); +local ldap_tls = module:get_option_boolean("ldap_tls"); +local ldap_base = assert(module:get_option_string("ldap_base"), "ldap_base is a required option for ldap"); local lualdap = require "lualdap"; local ld = assert(lualdap.open_simple(ldap_server, ldap_rootdn, ldap_password, ldap_tls));