Class: Challah::CookieStore

Inherits:
SimpleCookieStore show all
Defined in:
lib/challah/cookie_store.rb

Overview

Store session data in a cookie, but use the user’s user_agent and ip address in the cookie verification, for additional security.

This method will force the user to log in slightly more often, as user agents and IP addresses change.

To use a different storage method for persisting a session, just create a new class that responds to read, save and destroy

Instance Method Summary collapse

Methods inherited from SimpleCookieStore

#destroy, #initialize, #read, #save

Constructor Details

This class inherits a constructor from Challah::SimpleCookieStore

Instance Method Details

#inspectObject



12
13
14
# File 'lib/challah/cookie_store.rb', line 12

def inspect
  "#<CookieStore:0x#{object_id.to_s(16)} valid=#{existing?}>"
end