Class CGIKit::Session
In: lib/cgikit/session.rb
Parent: Object

A class for session management. Session objects have a hash of arbitary objects and information about browser name, IP address, etc. However, you can’t set objects that can’t be marshal ( IO, Proc, etc. ) to the session with default database manager FileSessionStore.

Methods

Included Modules

Logging

Constants

DEFAULT_SESSION_ID_FIGURES = 16
DEFAULT_TIMEOUT = 60 * 60 * 24 * 7

External Aliases

editing_context -> ec

Attributes

application  [RW] 
caches  [RW] 
context  [RW] 
context_ids  [RW] 
cookie_expires  [RW] 
editing_context  [RW] 
frame_components  [RW] 
last_accessed_time  [RW] 
permanent_caches  [RW] 
remote_addr  [RW]  IP address.
session_id  [RW]  Session ID.
session_key  [RW] 
session_store  [RW] 
timeout  [RW]  Seconds until the session has timed out.
user_agent  [RW]  Name of browser.
values  [RW]  A hash of arbitary objects.

Public Class methods

Public Instance methods

accessing

Enables or disables session authorization by IP addresses.

Enables or disables session authorization by browsers.

component( context_id )

marshaling

Returns true if the IP address is equal to one when the session created.

managing cookie

Enables or disables the use of cookies for storing session IDs.

Enables or disables the use of URLs for storing session IDs.

Returns true if the session isn’t expired.

Returns true if the browser is equal to one when the session created.

validating

[Validate]