session/state
src/session/state.tur
process-global store + cookie config for the middleware.
Since: v0.1.0
defn
session-set-store!
(session-set-store! [s : Store] :)
install the active store (called by session-mw).
Since: v0.1.0
defn
session-get-store
(session-get-store :)
the active store.
Since: v0.1.0
defn
session-set-config!
(session-set-config! [cookie-name : cstr path : cstr domain : cstr same-site : cstr signing-key : cstr max-age : int secure? : int http-only? : int rolling? : int] :)
install the cookie/TTL config (called by session-mw).
Since: v0.1.0
defn
session-config-ptr
(session-config-ptr :)
raw pointer to the active config struct (0 if unset).
Since: v0.1.0
defn
cfg-cookie-name
(cfg-cookie-name [p : int] :)
configured cookie name.
defn
cfg-path
(cfg-path [p : int] :)
configured cookie Path.
defn
cfg-domain
(cfg-domain [p : int] :)
configured cookie Domain ("" if none).
defn
cfg-same-site
(cfg-same-site [p : int] :)
configured SameSite value.
defn
cfg-max-age
(cfg-max-age [p : int] :)
configured Max-Age / TTL in seconds.
defn
cfg-secure?
(cfg-secure? [p : int] :)
1 if the Secure attribute is configured.
defn
cfg-http-only?
(cfg-http-only? [p : int] :)
1 if the HttpOnly attribute is configured.
defn
cfg-rolling?
(cfg-rolling? [p : int] :)
1 if rolling (sliding-window) sessions are configured.
defn
cfg-signing-key
(cfg-signing-key [p : int] :)
configured HMAC signing key ("" if signing is off).
Internal definitions
__reg-- the two-slot singleton (store handle + config pointer).__discard__cfg-new-- allocate the heap config struct, copying string fields.