Sha256: 3e03c9d5cb07d18a38c6399815ee2aefb1e9aad47764209290d627a4d8a20453
Contents?: true
Size: 466 Bytes
Versions: 2
Compression:
Stored size: 466 Bytes
Contents
# frozen_string_literal: true # Before logout hook to forget the user in the given scope, if it responds # to forget_me! Also clear remember token to ensure the user won't be # remembered again. Notice that we forget the user unless the record is not persisted. # This avoids forgetting deleted users. Warden::Manager.before_logout do |record, warden, options| if record.respond_to?(:forget_me!) Kingsman::Hooks::Proxy.new(warden).forget_me(record) end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
kingsman-0.1.1 | lib/kingsman/hooks/forgetable.rb |
kingsman-0.1.0 | lib/kingsman/hooks/forgetable.rb |