/usr/lib/ruby/vendor_ruby/merb-core/dispatch/session/container.rb is in ruby-merb-core 1.1.3+dfsg-2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 | module Merb
class SessionContainer < Mash
class_inheritable_accessor :session_store_type
cattr_accessor :subclasses
self.subclasses = []
# :api: private
attr_reader :session_id
# :api: private
attr_accessor :needs_new_cookie
class << self
# Register the subclass as an available session store type.
def inherited(klass)
self.subclasses << klass.to_s
super
end
# Generates a new session ID and creates a new session.
#
# ==== Returns
# SessionContainer:: The new session.
#
# :api: private
def generate
end
# ==== Parameters
# request<Merb::Request>:: The Merb::Request that came in from Rack.
#
# ==== Notes
# If no sessions were found, a new SessionContainer will be generated.
#
# ==== Returns
# SessionContainer:: a SessionContainer.
#
# :api: private
def setup(request)
end
end
# ==== Parameters
# session_id<String>:: A unique identifier for this session.
#
# :api: private
def initialize(session_id)
@_destroy = false
self.session_id = session_id
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
def session_id=(sid)
self.needs_new_cookie = (@session_id && @session_id != sid)
@session_id = sid
end
# Teardown and/or persist the current session.
#
# If @_destroy is true, clear out the session completely, including
# removal of the session cookie itself.
#
# ==== Parameters
# request<Merb::Request>:: The Merb::Request that came in from Rack.
#
# :api: private
def finalize(request)
end
# Destroy the current session - clears data and removes session cookie.
#
# :api: private
def clear!
@_destroy = true
self.clear
end
# Regenerate the session_id.
#
# :api: private
def regenerate
end
end
end
|