diff options
author | telyn <telyn@bytemark.co.uk> | 2018-01-24 15:02:22 +0000 |
---|---|---|
committer | telyn <telyn@bytemark.co.uk> | 2018-01-24 15:02:22 +0000 |
commit | 5c51c44637e3af1382782b68d83c61c075251c3d (patch) | |
tree | 5eeddcc5f4ceb74ca8f071f18a55effa17ea22ed /lib/mauve | |
parent | 2ad9283fd856f7774e9806ed6aa3b949a5819dd1 (diff) | |
parent | 0be1fa0ebadf9435a760582d17f47ff96dc0851c (diff) |
Merge master from Bytemark's internal gitlab
Diffstat (limited to 'lib/mauve')
-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 |