Method: Authlogic::Session::BruteForceProtection::InstanceMethods#being_brute_force_protected?

Defined in:
lib/authlogic/session/brute_force_protection.rb

#being_brute_force_protected?Boolean

Returns true when the consecutive_failed_logins_limit has been exceeded and is being temporarily banned. Notice the word temporary, the user will not be permanently banned unless you choose to do so with configuration. By default they will be banned for 2 hours. During that 2 hour period this method will return true.

Returns:

  • (Boolean)


59
60
61
62
# File 'lib/authlogic/session/brute_force_protection.rb', line 59

def being_brute_force_protected?
  exceeded_failed_logins_limit? && ( <= 0 ||
    (attempted_record.respond_to?(:updated_at) && attempted_record.updated_at >= .seconds.ago))
end