Class/Module Index [+]

Quicksearch

Authlogic::Session::BruteForceProtection::InstanceMethods

The methods available for an Authlogic::Session::Base object that make up the brute force protection feature.

Public Instance Methods

being_brute_force_protected?() click to toggle source

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.

# File lib/authlogic/session/brute_force_protection.rb, line 59
def being_brute_force_protected?
  exceeded_failed_logins_limit? && (failed_login_ban_for <= 0 ||
    (attempted_record.respond_to?(:updated_at) && attempted_record.updated_at >= failed_login_ban_for.seconds.ago))
end

[Validate]

Generated with the Darkfish Rdoc Generator 2.