diff options
author | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-03-22 17:44:34 +0000 |
---|---|---|
committer | Patrick J Cherry <patrick@bytemark.co.uk> | 2012-03-22 17:44:34 +0000 |
commit | fb491aee8f771c2240b84b06ab95337123f7ec1a (patch) | |
tree | 5cb7ed1673f91e982d800a5dc7101979e70b4ace /lib/mauve/authentication.rb | |
parent | 887ab0cd350434b67b17c545e5975869bddd8b11 (diff) | |
parent | dc443284c4b5f59a4447797f88730d9fe1bc0b45 (diff) |
merge
Diffstat (limited to 'lib/mauve/authentication.rb')
-rw-r--r-- | lib/mauve/authentication.rb | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/mauve/authentication.rb b/lib/mauve/authentication.rb index d0d4596..54743f1 100644 --- a/lib/mauve/authentication.rb +++ b/lib/mauve/authentication.rb @@ -139,7 +139,7 @@ module Mauve client.login(login, response) return true rescue XMLRPC::FaultException => fault - logger.warn "Authentication for #{login} failed: #{fault.faultCode}: #{fault.faultString}" + logger.warn "#{self.class} for #{login} failed: #{fault.faultCode}: #{fault.faultString}" return false rescue IOError => ex logger.warn "#{ex.class} during auth for #{login} (#{ex.to_s})" @@ -164,7 +164,12 @@ module Mauve # @return [Boolean] def authenticate(login,password) super - Digest::SHA1.hexdigest(password) == Mauve::Configuration.current.people[login].password + if ( Digest::SHA1.hexdigest(password) == Mauve::Configuration.current.people[login].password ) + return true + else + logger.warn "#{self.class} for #{login} failed" + return false + end end end |