aboutsummaryrefslogtreecommitdiff
path: root/lib/mauve/authentication.rb
diff options
context:
space:
mode:
authorPatrick J Cherry <patrick@bytemark.co.uk>2012-04-25 17:15:49 +0100
committerPatrick J Cherry <patrick@bytemark.co.uk>2012-04-25 17:15:49 +0100
commite959c0fe4c887154bbe28c31324fef2975cbe467 (patch)
tree3088c7a1f389944d613e57b551b452f7ec83181d /lib/mauve/authentication.rb
parent5fff12fc11cb8b02a44fd40ed78fa9d196f269d7 (diff)
Big update.
* Max acknowledgement time is now specified in the config * Calendar interface improved. * holiday_url no longer used -- replaced by notify_when_on_holiday! * added notify_when_off_sick! * Added ability for the calendar to be queried for a list of bank holdays. * Added ability for Time to be given a list of bank holidays to check against. * PeopleLists can now be a Proc, allowing downloading of lists * Person is no longer a struct * Moved the method_missing bit into ObjectBuilder from various sub classes. * Added tests for the calendar interface * Updated tests in other bits.
Diffstat (limited to 'lib/mauve/authentication.rb')
-rw-r--r--lib/mauve/authentication.rb10
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/mauve/authentication.rb b/lib/mauve/authentication.rb
index c467a1d..24c6bd3 100644
--- a/lib/mauve/authentication.rb
+++ b/lib/mauve/authentication.rb
@@ -70,7 +70,7 @@ module Mauve
unless true == result
logger.info "Authentication for #{login} failed"
# Rate limit
- sleep Server.instance.failed_login_delay
+ sleep Configuration.current.failed_login_delay
end
result
@@ -97,15 +97,15 @@ module Mauve
#
# Don't bother checking if no auth_url has been set.
#
- return false unless Server.instance.bytemark_auth_url.is_a?(URI)
+ return false unless Configuration.current.bytemark_auth_url.is_a?(URI)
#
# Don't bother checking if the person doesn't exist.
#
return false unless Mauve::Configuration.current.people.has_key?(login)
- uri = Server.instance.bytemark_auth_url
- timeout = Server.instance.remote_http_timeout
+ uri = Configuration.current.bytemark_auth_url
+ timeout = Configuration.current.remote_http_timeout
# host=nil, path=nil, port=nil, proxy_host=nil, proxy_port=nil, user=nil, password=nil, use_ssl=nil, timeout=nil)
client = XMLRPC::Client.new(uri.host, uri.path, uri.port, nil, nil, uri.user, uri.password, uri.scheme == "https", timeout)
@@ -114,7 +114,7 @@ module Mauve
#
if client.http.use_ssl?
client.http.ca_path = "/etc/ssl/certs/"
- client.http.verify_mode = Server.instance.remote_https_verify_mode
+ client.http.verify_mode = Configuration.current.remote_https_verify_mode
end
begin