Class: EncryptedCookieStore::EncryptedCookieStore
- Inherits:
-
ActionDispatch::Session::CookieStore
- Object
- ActionDispatch::Session::CookieStore
- EncryptedCookieStore::EncryptedCookieStore
- Defined in:
- lib/encrypted-cookie-store/encrypted_cookie_store.rb
Overview
swap out the signed cookie jar for an encrypted cookie jar
Instance Method Summary (collapse)
Instance Method Details
- (Object) set_cookie(request, options)
16 17 18 |
# File 'lib/encrypted-cookie-store/encrypted_cookie_store.rb', line 16 def (request, ) request..encrypted[@key] = end |
- (Object) unpacked_cookie_data(env)
4 5 6 7 8 9 10 11 12 13 14 |
# File 'lib/encrypted-cookie-store/encrypted_cookie_store.rb', line 4 def (env) env["action_dispatch.request.unsigned_session_cookie"] ||= begin stale_session_check! do request = ActionDispatch::Request.new(env) if data = request..encrypted[@key] data.stringify_keys! end data || {} end end end |