Sha256: c3214a03507a86623350ab43ca2418130c68df645b3b204fc453a5e392bcf921

Contents?: true

Size: 729 Bytes

Versions: 77

Compression:

Stored size: 729 Bytes

Contents

module Authlogic
  module Session
    # Maintains the perishable token, which is helpful for confirming records or authorizing records to reset their password. All that this
    # module does is reset it after a session have been saved, just keep it changing. The more it changes, the tighter the security.
    #
    # See Authlogic::ActsAsAuthentic::PerishableToken for more information.
    module PerishableToken
      def self.included(klass)
        klass.after_save :reset_perishable_token!
      end
      
      private
        def reset_perishable_token!
          record.reset_perishable_token if record.respond_to?(:reset_perishable_token) && !record.disable_perishable_token_maintenance?
        end
    end
  end
end

Version data entries

77 entries across 77 versions & 22 rubygems

Version Path
authlogic-3.4.6 lib/authlogic/session/perishable_token.rb
authlogic-3.4.5 lib/authlogic/session/perishable_token.rb
authlogic-2.1.11 lib/authlogic/session/perishable_token.rb
authlogic-2.1.10 lib/authlogic/session/perishable_token.rb
authlogic-3.4.4 lib/authlogic/session/perishable_token.rb
authlogic-3.4.3 lib/authlogic/session/perishable_token.rb
binarylogic-authlogic-2.1.0 lib/authlogic/session/perishable_token.rb
binarylogic-authlogic-2.1.1 lib/authlogic/session/perishable_token.rb
crankharder-authlogic-2.1.1 lib/authlogic/session/perishable_token.rb
jlecour-authlogic-2.1.2 lib/authlogic/session/perishable_token.rb
kschrader-authlogic-2.1.2 lib/authlogic/session/perishable_token.rb
kschrader-authlogic-2.1.3 lib/authlogic/session/perishable_token.rb
authlogic-3.4.2 lib/authlogic/session/perishable_token.rb
authlogic-3.4.1 lib/authlogic/session/perishable_token.rb
authlogic-3.4.0 lib/authlogic/session/perishable_token.rb
authlogic-3.3.0 lib/authlogic/session/perishable_token.rb
authlogic-3.2.0 lib/authlogic/session/perishable_token.rb
authlogic-3.1.3 lib/authlogic/session/perishable_token.rb
authlogic-2.1.8 lib/authlogic/session/perishable_token.rb
authlogic-2.1.7 lib/authlogic/session/perishable_token.rb