-
-
Save pwim/520483 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
odule Authlogic::Session::Timeout::DontLockoutApiKeyOrHttpAuth | |
def self.included(klass) | |
klass.class_eval do | |
dont_lockout = "single_access? || persist_by_http_auth?" | |
before_persisting_callback_chain.detect {|c| c.method == :reset_stale_state }.options.update(:unless => dont_lockout) | |
after_persisting_callback_chain.detect {|c| c.method == :enforce_timeout }.options.update(:unless => dont_lockout) | |
end | |
end | |
end | |
class Authlogic::Session::Base | |
include Authlogic::Session::Timeout::DontLockoutApiKeyOrHttpAuth | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment