Class: ActionDispatch::Session::DynamodbStore

Inherits:
Aws::SessionStore::DynamoDB::RackMiddleware
  • Object
show all
Includes:
SessionObject, StaleSessionCheck
Defined in:
lib/action_dispatch/session/dynamodb_store.rb

Overview

Uses the Dynamo DB Session Store implementation to create a class that extends ActionDispatch::Session. Rails will create a :dynamodb_store configuration for session_store from this class name.

This class will use the Rails secret_key_base unless otherwise provided.

Configuration can also be provided in YAML files from Rails config, either in “config/session_store.yml” or “config/session_store/#{Rails.env}.yml”. Configuration files that are environment-specific will take precedence.

Instance Method Summary collapse

Constructor Details

#initialize(app, options = {}) ⇒ DynamodbStore

Returns a new instance of DynamodbStore.



23
24
25
26
27
# File 'lib/action_dispatch/session/dynamodb_store.rb', line 23

def initialize(app, options = {})
  options[:config_file] ||= config_file if File.exist?(config_file)
  options[:secret_key] ||= Rails.application.secret_key_base
  super
end