class
Marten::HTTP::Cookies::SubStore::Encrypted
Overview
Encrypted sub cookie store.
Defined in:
marten/http/cookies/sub_store/encrypted.crInstance Method Summary
-
#fetch(name : String | Symbol, &)
Returns the value matching the passed encrypted cookie name, or calls a block with the name when not found.
-
#fetch(name : String | Symbol, default = nil)
Returns the value matchine the passed encrypted cookie name, or the
defaultone if it is not present. -
#set(name : String | Symbol, value, **kwargs) : Nil
Allows to set a cookie that is encrypted.
Instance methods inherited from class Marten::HTTP::Cookies::SubStore::Base
[](name : String | Symbol)
[],
[]=(name, value)
[]=,
[]?(name : String | Symbol)
[]?,
fetch(name : String | Symbol, default = nil)
fetch,
set(name : String | Symbol, value, **kwargs) : Nil
set
Constructor methods inherited from class Marten::HTTP::Cookies::SubStore::Base
new(store : Cookies)
new
Instance Method Detail
Returns the value matching the passed encrypted cookie name, or calls a block with the name when not found.
Returns the value matchine the passed encrypted cookie name, or the default one if it is not present.
Allows to set a cookie that is encrypted.
The string representation of the passed value object will be encrypted, and the resulting string will be
used as the cookie value. Appart from the cookie name and value, this method allows to define some
additional cookie properties:
- the cookie expiry datetime (
expiresargument) - the cookie
path - the associated
domain(useful in order to define cross-domain cookies) - whether or not the cookie should be sent for HTTPS requests only (
secureargument) - whether or not client-side scripts should have access to the cookie (
http_onlyargument) - the
same_sitepolicy (accepted values are"lax"or"strict")