diff options
author | Michael Coyne <mikeycgto@gmail.com> | 2017-09-23 17:18:01 -0400 |
---|---|---|
committer | Michael Coyne <mikeycgto@gmail.com> | 2017-09-24 12:23:38 -0400 |
commit | 8b0af54bbe5ab8b598e980013dd53a50d819b636 (patch) | |
tree | 05c883f46d687c0483db2313185420804e13c4c7 /actionpack/test/dispatch/routing_test.rb | |
parent | 39f8ca64cec8667b66628e970211b4d18abbc373 (diff) | |
download | rails-8b0af54bbe5ab8b598e980013dd53a50d819b636.tar.gz rails-8b0af54bbe5ab8b598e980013dd53a50d819b636.tar.bz2 rails-8b0af54bbe5ab8b598e980013dd53a50d819b636.zip |
Add key rotation cookies middleware
Using the action_dispatch.cookies_rotations interface, key rotation is
now possible with cookies. Thus the secret_key_base as well as salts,
ciphers, and digests, can be rotated without expiring sessions.
Diffstat (limited to 'actionpack/test/dispatch/routing_test.rb')
-rw-r--r-- | actionpack/test/dispatch/routing_test.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/actionpack/test/dispatch/routing_test.rb b/actionpack/test/dispatch/routing_test.rb index 446b65a9b9..44f902c163 100644 --- a/actionpack/test/dispatch/routing_test.rb +++ b/actionpack/test/dispatch/routing_test.rb @@ -3,6 +3,7 @@ require "erb" require "abstract_unit" require "controller/fake_controllers" +require "active_support/messages/rotation_configuration" class TestRoutingMapper < ActionDispatch::IntegrationTest SprocketsApp = lambda { |env| @@ -4947,6 +4948,7 @@ end class FlashRedirectTest < ActionDispatch::IntegrationTest SessionKey = "_myapp_session" Generator = ActiveSupport::LegacyKeyGenerator.new("b3c631c314c0bbca50c1b2843150fe33") + Rotations = ActiveSupport::Messages::RotationConfiguration.new class KeyGeneratorMiddleware def initialize(app) @@ -4955,6 +4957,8 @@ class FlashRedirectTest < ActionDispatch::IntegrationTest def call(env) env["action_dispatch.key_generator"] ||= Generator + env["action_dispatch.cookies_rotations"] ||= Rotations + @app.call(env) end end |