Module: ActionDispatch::RequestCookieMethods

Defined in:
actionpack/lib/action_dispatch/middleware/cookies.rb

Instance Method Summary collapse

Instance Method Details



48
49
50
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 48

def authenticated_encrypted_cookie_salt
  get_header Cookies::AUTHENTICATED_ENCRYPTED_COOKIE_SALT
end


11
12
13
14
15
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 11

def cookie_jar
  fetch_header("action_dispatch.cookies") do
    self.cookie_jar = Cookies::CookieJar.build(self, cookies)
  end
end


28
29
30
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 28

def cookie_jar=(jar)
  set_header "action_dispatch.cookies", jar
end

#cookies_digestObject



76
77
78
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 76

def cookies_digest
  get_header Cookies::COOKIES_DIGEST
end

#cookies_rotationsObject



80
81
82
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 80

def cookies_rotations
  get_header Cookies::COOKIES_ROTATIONS
end

#cookies_same_site_protectionObject



72
73
74
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 72

def cookies_same_site_protection
  get_header(Cookies::COOKIES_SAME_SITE_PROTECTION)&.call(self)
end

#cookies_serializerObject



68
69
70
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 68

def cookies_serializer
  get_header Cookies::COOKIES_SERIALIZER
end


56
57
58
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 56

def encrypted_cookie_cipher
  get_header Cookies::ENCRYPTED_COOKIE_CIPHER
end


40
41
42
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 40

def encrypted_cookie_salt
  get_header Cookies::ENCRYPTED_COOKIE_SALT
end


44
45
46
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 44

def encrypted_signed_cookie_salt
  get_header Cookies::ENCRYPTED_SIGNED_COOKIE_SALT
end

Returns:

  • (Boolean)


24
25
26
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 24

def have_cookie_jar?
  has_header? "action_dispatch.cookies"
end

#key_generatorObject



32
33
34
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 32

def key_generator
  get_header Cookies::GENERATOR_KEY
end

#secret_key_baseObject



64
65
66
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 64

def secret_key_base
  get_header Cookies::SECRET_KEY_BASE
end


60
61
62
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 60

def signed_cookie_digest
  get_header Cookies::SIGNED_COOKIE_DIGEST
end


36
37
38
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 36

def signed_cookie_salt
  get_header Cookies::SIGNED_COOKIE_SALT
end


52
53
54
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 52

def use_authenticated_cookie_encryption
  get_header Cookies::USE_AUTHENTICATED_COOKIE_ENCRYPTION
end

#use_cookies_with_metadataObject



84
85
86
# File 'actionpack/lib/action_dispatch/middleware/cookies.rb', line 84

def 
  get_header Cookies::USE_COOKIES_WITH_METADATA
end