Sha256: 3d2f4b2aa462323e047b1b8c8b729fe5d865911b25978cca24ff64fc0b9b1d0e
Contents?: true
Size: 648 Bytes
Versions: 6
Compression:
Stored size: 648 Bytes
Contents
module Warden module CookieSession class DefaultWrapper def initialize(klass = nil) @klass = klass end def serialize_record(record) # like in https://github.com/plataformatec/devise/blob/master/lib/devise/models/authenticatable.rb [record.to_key, record.authenticatable_salt] end def fetch_record(key) @klass.find(key.first) end def validate_record(record, salt) # like in https://github.com/plataformatec/devise/blob/master/lib/devise/models/authenticatable.rb record if record && record.authenticatable_salt == salt end end end end
Version data entries
6 entries across 6 versions & 1 rubygems