Liking cljdoc? Tell your friends :D

turvata.session


authenticate-browser-tokenclj

(authenticate-browser-token env token!!)

Authenticate a browser session token.

Given a session token (e.g. from a cookie), returns a map on success: {:user-id <string> :expires-at <ms> :refreshed? <boolean>}

Authentication succeeds if the token exists and is not expired. If session TTL is positive, the expiration is refreshed when remaining TTL is at or below 50%. If TTL is non-positive, the token is never refreshed.

Returns nil if the token is missing, unknown, or expired.

Authenticate a browser session token.

Given a session token (e.g. from a cookie), returns a map on success:
{:user-id <string> :expires-at <ms> :refreshed? <boolean>}

Authentication succeeds if the token exists and is not expired.
If session TTL is positive, the expiration is refreshed when remaining TTL
is at or below 50%. If TTL is non-positive, the token is never refreshed.

Returns nil if the token is missing, unknown, or expired.
sourceraw docstring

in-memory-storeclj

(in-memory-store)

Atom-backed in-memory session store.

Atom-backed in-memory session store.
sourceraw docstring

now-msclj

(now-ms)
source

SessionStorecljprotocol

delete-entry!clj

(delete-entry! this token)

get-entryclj

(get-entry this token)

prune-expired!clj

(prune-expired! this now-ms)

put-entry!clj

(put-entry! this token entry)

touch!clj

(touch! this token new-expires-at)
source

cljdoc builds & hosts documentation for Clojure/Script libraries

Keyboard shortcuts
Ctrl+kJump to recent docs
Move to previous article
Move to next article
Ctrl+/Jump to the search field
× close