module ActiveLDAP # Configuration # # Configuration provides the default settings required for # ActiveLDAP to work with your LDAP server. All of these # settings can be passed in at initialization time. module Configuration DEFAULT_CONFIG = {} DEFAULT_CONFIG[:host] = '127.0.0.1' DEFAULT_CONFIG[:port] = 389 DEFAULT_CONFIG[:method] = :plain # :ssl, :tls, :plain allowed DEFAULT_CONFIG[:bind_format] = "cn=%s,dc=localdomain" DEFAULT_CONFIG[:user] = ENV['USER'] DEFAULT_CONFIG[:password_block] = nil DEFAULT_CONFIG[:password] = nil DEFAULT_CONFIG[:store_password] = true DEFAULT_CONFIG[:allow_anonymous] = true DEFAULT_CONFIG[:sasl_quiet] = false DEFAULT_CONFIG[:try_sasl] = false DEFAULT_CONFIG[:retries] = 3 DEFAULT_CONFIG[:retry_wait] = 3 DEFAULT_CONFIG[:logger] = nil DEFAULT_CONFIG[:ldap_scope] = LDAP::LDAP_SCOPE_ONELEVEL # Make the return value the string that is your LDAP base def Base.base 'dc=localdomain' end # This is optionally set to the array of objectClass names # that are minimally required for EVERY object on your LDAP server. # If you don't want one, set this to []. def Base.required_classes ['top'] end end end