Module | Merb::SessionMixin::RequestMixin
In: | lib/merb-core/dispatch/session.rb

### Methods

default_cookies default_session_store destroy_session_cookie finalize_session finalize_sessions included session session= session? session_cookie_value session_id session_stores set_session_cookie_value set_session_id_cookie

### Classes and Modules

Module Merb::SessionMixin::RequestMixin::ClassMethods

### Public Class methods

included(base)

Adds class methods to Merb::Request object. Sets up repository of session store types. Sets the session ID key and expiry values.

:api: private

### Public Instance methods

default_cookies()

Assign default cookie values

:api: private

default_session_store()

The default session store type.

:api: private

destroy_session_cookie()

Destroy the session cookie.

:api: private

finalize_session()

Teardown and/or persist the current sessions.

:api: private

finalize_sessions()

Alias for finalize_session

session(session_store = nil)

Returns session container. Merb is able to handle multiple session stores, hence a parameter to pick it.

#### Parameters

session_store<String>: | The type of session store to access,

defaults to default_session_store.

### Notes

If no suitable session store type is given, it defaults to cookie-based sessions.

#### Returns

SessionContainer: | an instance of a session store extending Merb::SessionContainer.

:api: public

session=(new_session)

#### Parameters

new_session<Merb::SessionContainer>: | A session store instance.

### Notes

The session is assigned internally by its session_store_type key.

:api: private

session?(session_store = nil)

Whether a session has been setup

#### Returns

Boolean: | true if the session is part of the session stores configured.

:api: private

session_cookie_value()

#### Returns

String: | The value of the session cookie; either the session id or the actual encoded data.

:api: private

session_id()

Alias for session_cookie_value

session_stores()

#### Returns

Hash: | All active session stores by type.

:api: private

set_session_cookie_value(value, options = {})

Sets session cookie value.

#### Parameters

value<String>: | The value of the session cookie; either the session id or the actual encoded data.
options<Hash>: | Cookie options like domain, path and expired.

:api: private

set_session_id_cookie(value, options = {})

Alias for set_session_cookie_value

[Validate]