Sha256: 6189cab24478be723c59b4b7ad7a4d936ddce9f1af3896938eca892656f4fdb6
Contents?: true
Size: 411 Bytes
Versions: 7
Compression:
Stored size: 411 Bytes
Contents
# After each sign in, if resource responds to failed_attempts, sets it to 0 # This is only triggered when the user is explicitly set (with set_user) Warden::Manager.after_set_user :except => :fetch do |record, warden, options| if record.respond_to?(:failed_attempts) && warden.authenticated?(options[:scope]) record.update_attribute(:failed_attempts, 0) unless record.failed_attempts.to_i.zero? end end
Version data entries
7 entries across 7 versions & 1 rubygems