lib/adauth.rb in adauth-2.0.0 vs lib/adauth.rb in adauth-2.0.1
- old
+ new
@@ -1,9 +1,9 @@
# Requires
+require 'logger'
require 'net/ldap'
require 'timeout'
-require 'logger'
# Version
require 'adauth/version'
# Classes
require 'adauth/ad_object'
require 'adauth/authenticate'
@@ -26,10 +26,11 @@
module Adauth
# Yields a new config object and then sets it as the Adauth Config
def self.configure
@logger ||= Logger.new('log/adauth.log', 'weekly')
@logger.info('load') { "Loading new config" }
+ @connection = nil
@config = Config.new
yield(@config)
end
# Returns Adauths current connection to ActiveDirectory
@@ -51,19 +52,22 @@
{
:domain => @config.domain,
:server => @config.server,
:port => @config.port,
:base => @config.base,
- :encryption => @config.encryption,
+ :encryption => @config.encryption,
+ :allow_fallback => @config.allow_fallback,
:username => user,
:password => password
}
end
+ # Returns the logger object
def self.logger
@logger
end
+ # Lets you set a new logger
def self.logger=(inputs)
@logger = inputs
end
end
\ No newline at end of file