Liking cljdoc? Tell your friends :D

framework.session.core

Xiana's session management

Xiana's session management
raw docstring

->jsonclj

source

->pgobjectclj

(->pgobject x)

Transforms Clojure data to a PGobject that contains the data as JSON. PGObject type defaults to jsonb but can be changed via metadata key :pgtype

Transforms Clojure data to a PGobject that contains the data as
JSON. PGObject type defaults to `jsonb` but can be changed via
metadata key `:pgtype`
sourceraw docstring

->session-dataclj

(->session-data table rs)
source

->session-idclj

(->session-id {{headers :headers cookies :cookies query-params :query-params}
                 :request})
source

<-jsonclj

source

<-pgobjectclj

(<-pgobject v)

Transform PGobject containing json or jsonb value to Clojure data.

Transform PGobject containing `json` or `jsonb` value to Clojure
data.
sourceraw docstring

connectclj

(connect {backend-config :xiana/session-backend :as cfg})
source

fetch-sessionclj

(fetch-session state)
source

guest-session-interceptorclj

source

init-backendclj

(init-backend {session-backend :session-backend
               {storage :storage} :xiana/session-backend
               :as config})
source

interceptorclj

source

mapperclj

source

protected-interceptorclj

(protected-interceptor protected-path excluded-resource)

On enter allows a resource to be served when

  • it is not protected or
  • the user-provided session-id exists in the server's session store. If the session exists in the session store, it's copies it to the (-> state :session-data), else responds with {:status 401 :body "Invalid or missing session"}

On leave, it updates the session storage from (-> state :session-data)

On enter allows a resource to be served when
   * it is not protected
or
   * the user-provided `session-id` exists in the server's session store.
If the session exists in the session store, it's copies it to the (-> state :session-data),
else responds with {:status 401
                    :body   "Invalid or missing session"}

On leave, it updates the session storage from (-> state :session-data)
sourceraw docstring

Sessioncljprotocol

add!clj

(add! _ k v)

delete!clj

(delete! _ k)

dumpclj

(dump _)

erase!clj

(erase! _)

fetchclj

(fetch _ k)
source

un-objectifyclj

(un-objectify table data)
source

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

× close