Class: ActionDispatch::Cookies::SignedCookieJar
- Inherits:
-
Object
- Object
- ActionDispatch::Cookies::SignedCookieJar
- Defined in:
- lib/flash_patch.rb,
lib/flash_patch.rb
Instance Method Summary collapse
Instance Method Details
#[](name) ⇒ Object
22 23 24 25 26 27 28 29 30 31 32 33 34 35 |
# File 'lib/flash_patch.rb', line 22 def [](name) if = @parent_jar[name] begin @verifier.verify() rescue ArgumentError data, digest = .split("--") string = ActiveSupport::Base64.decode64(data) FlashPatch::Rails31SessionLoader.new(string).load_session end end rescue ActiveSupport::MessageVerifier::InvalidSignature nil end |
#initialize_with_nonloading_verifier(parent_jar, secret) ⇒ Object
52 53 54 55 |
# File 'lib/flash_patch.rb', line 52 def initialize_with_nonloading_verifier(parent_jar, secret) initialize_without_nonloading_verifier(parent_jar, secret) @nonloading_verifier = ActiveSupport::MessageVerifier.new(secret, :serializer => DummySerializer) end |