Class: ActionDispatch::Cookies::SignedCookieWithDeprecatedTokenJar
- Inherits:
-
SignedCookieJar
- Object
- SignedCookieJar
- ActionDispatch::Cookies::SignedCookieWithDeprecatedTokenJar
- Defined in:
- lib/secret_token_migration/action_dispatch/cookies.rb
Instance Method Summary collapse
-
#initialize(parent_jar, secret, options = {}) ⇒ SignedCookieWithDeprecatedTokenJar
constructor
A new instance of SignedCookieWithDeprecatedTokenJar.
Constructor Details
#initialize(parent_jar, secret, options = {}) ⇒ SignedCookieWithDeprecatedTokenJar
Returns a new instance of SignedCookieWithDeprecatedTokenJar.
25 26 27 28 29 30 31 |
# File 'lib/secret_token_migration/action_dispatch/cookies.rb', line 25 def initialize(parent_jar, secret, ={}) ensure_secret_secure(secret) ensure_secret_secure([:deprecated_secret]) @parent_jar = parent_jar @verifier = ActiveSupport::MessageVerifier.new(secret, ) @verifier.instance_variable_set(:@deprecated_secret, [:deprecated_secret]) end |