Class: ActionDispatch::Session::DynamoDbStore
- Inherits:
-
AbstractStore
- Object
- AbstractStore
- ActionDispatch::Session::DynamoDbStore
- Defined in:
- lib/action_dispatch/session/dynamo_db_store.rb
Overview
Uses the DynamoDB Session Store implementation to create a class that extends ‘ActionDispatch::Session`. Rails will create a `:dynamo_db_store` configuration for `:session_store` from this class name.
This class will use ‘Rails.application.secret_key_base` as the secret key unless otherwise provided.
Configuration can also be provided in YAML files from Rails config, either in ‘config/dynamo_db_session_store.yml` or `config/dynamo_db_session_store/Rails.env.yml`. Configuration files that are environment-specific will take precedence.
Direct Known Subclasses
Instance Method Summary collapse
- #config ⇒ Aws::SessionStore::DynamoDB::Configuration
-
#initialize(app, options = {}) ⇒ DynamoDbStore
constructor
A new instance of DynamoDbStore.
Constructor Details
#initialize(app, options = {}) ⇒ DynamoDbStore
Returns a new instance of DynamoDbStore.
21 22 23 24 25 26 27 28 29 30 |
# File 'lib/action_dispatch/session/dynamo_db_store.rb', line 21 def initialize(app, = {}) Rails.logger.warn('** Dynamo DB Session Storage no longer lives in aws-sdk-rails. ' \ 'To avoid disruption, please add aws-actiondispatch-dynamodb ~> 0 to your Gemfile to ' \ 'enable this feature when upgrading to aws-sdk-rails ~> 5. **') [:config_file] ||= config_file [:secret_key] ||= Rails.application.secret_key_base @middleware = Aws::SessionStore::DynamoDB::RackMiddleware.new(app, ) config.dynamo_db_client.config.user_agent_frameworks << 'aws-actiondispatch-dynamodb' super end |
Instance Method Details
#config ⇒ Aws::SessionStore::DynamoDB::Configuration
33 34 35 |
# File 'lib/action_dispatch/session/dynamo_db_store.rb', line 33 def config @middleware.config end |