Class | Merb::SessionContainer |
In: |
merb-core/lib/merb-core/dispatch/session/container.rb
|
Parent: | Mash |
needs_new_cookie | [RW] | :api: private |
session_id | [R] | :api: private |
Generates a new session ID and creates a new session.
SessionContainer: | The new session. |
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 27 27: def generate 28: end
Register the subclass as an available session store type.
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 16 16: def inherited(klass) 17: self.subclasses << klass.to_s 18: super 19: end
request<Merb::Request>: | The Merb::Request that came in from Rack. |
If no sessions were found, a new SessionContainer will be generated.
SessionContainer: | a SessionContainer. |
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 40 40: def setup(request) 41: end
Destroy the current session - clears data and removes session cookie.
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 80 80: def clear! 81: @_destroy = true 82: self.clear 83: end
Teardown and/or persist the current session.
If @_destroy is true, clear out the session completely, including removal of the session cookie itself.
request<Merb::Request>: | The Merb::Request that came in from Rack. |
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 74 74: def finalize(request) 75: end
Regenerate the session_id.
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 88 88: def regenerate 89: end
Assign a new session_id.
Recreates the cookie with the default expiration time. Useful during log in for pushing back the expiration date.
:api: private
# File merb-core/lib/merb-core/dispatch/session/container.rb, line 60 60: def session_id=(sid) 61: self.needs_new_cookie = (@session_id && @session_id != sid) 62: @session_id = sid 63: end