Liking cljdoc? Tell your friends :D

noir.cookies

Stateful access to cookie values

Stateful access to cookie values
raw docstring

*cur-cookies*clj

source

*new-cookies*clj

source

getclj

(get k)
(get k default)

Get the value of a cookie from the request. k can either be a string or keyword. If this is a signed cookie, use get-signed, otherwise the signature will not be checked.

Get the value of a cookie from the request. k can either be a string or keyword.
If this is a signed cookie, use get-signed, otherwise the signature will not be
checked.
sourceraw docstring

get-signedclj

(get-signed sign-key k)
(get-signed sign-key k default)

Get the value of a cookie from the request using 'get'. Verifies that a signing cookie also exists. If not, returns default or nil.

Get the value of a cookie from the request using 'get'. Verifies that a signing
cookie also exists. If not, returns default or nil. 
sourceraw docstring

noir-cookiesclj

(noir-cookies handler)
source

put!clj

(put! k v)

Add a new cookie whose name is k and has the value v. If v is a string a cookie map is created with :path '/'. To set custom attributes, such as "expires", provide a map as v. Stores all keys as strings.

Add a new cookie whose name is k and has the value v. If v is a string
a cookie map is created with :path '/'. To set custom attributes, such as
"expires", provide a map as v. Stores all keys as strings.
sourceraw docstring

put-signed!clj

(put-signed! sign-key k v)

Adds a new cookie whose name is k and has the value v. In addition, adds another cookie that checks the authenticity of 'v'. Sign-key should be a secret that's user-wide, session-wide or site wide (worst).

Adds a new cookie whose name is k and has the value v. In addition,
adds another cookie that checks the authenticity of 'v'. Sign-key
should be a secret that's user-wide, session-wide or site wide (worst).
sourceraw docstring

signed-nameclj

(signed-name k)
source

wrap-noir-cookiesclj

(wrap-noir-cookies handler)
source

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close