diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mauve/authentication.rb | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/mauve/authentication.rb b/lib/mauve/authentication.rb index 73c503a..08e0bf0 100644 --- a/lib/mauve/authentication.rb +++ b/lib/mauve/authentication.rb @@ -49,9 +49,7 @@ module Mauve # @return [Boolean] Success or failure. # def self.authenticate(login, password) - result = false - - ORDER.any? do |klass| + auth_success = ORDER.any? do |klass| auth = klass.new result = begin @@ -67,13 +65,13 @@ module Mauve result end - unless true == result + unless auth_success logger.info "Authentication for #{login} failed" # Rate limit sleep Configuration.current.failed_login_delay end - result + auth_success end end |