Class: Merb::SessionContainer

Class | Merb::SessionContainer
In: | lib/merb-core/dispatch/session/container.rb
Parent: | Mash

### Methods

clear! finalize generate inherited new regenerate session_id= setup

### Attributes

needs_new_cookie | [RW] | :api: private
session_id | [R] | :api: private

### Public Class methods

generate()

Generates a new session ID and creates a new session.

#### Returns

SessionContainer: | The new session.

:api: private

inherited(klass)

Register the subclass as an available session store type.

new(session_id)

#### Parameters

session_id<String>: | A unique identifier for this session.

:api: private

setup(request)

#### 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

### Public Instance methods

clear!()

Destroy the current session - clears data and removes session cookie.

:api: private

finalize(request)

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

regenerate()

Regenerate the session_id.

:api: private

session_id=(sid)

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

[Validate]