Xiana's session management
Xiana's session management
(->session-id {{headers :headers cookies :cookies query-params :query-params}
:request})(init-in-memory cfg)(init-in-memory cfg m)Initialize session in memory.
Initialize session in memory.
(protected-interceptor protected-path excluded-resource)On enter allows a resource to be served when
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)(add! _ k v)(delete! _ k)(dump _)(erase! _)(fetch _ k)cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |