Liking cljdoc? Tell your friends :D

lupapiste-commons.ring.mongo-session

MongoDB-backed Ring SessionStore

  • Session keys are generated with 256-bit CSPRNG randomness (java.security.SecureRandom) and encoded as URL-safe Base64 (43 characters, no padding).
  • The database stores a SHA-256 hash of the session key as the document _id
MongoDB-backed Ring SessionStore
- Session keys are generated with 256-bit CSPRNG randomness (java.security.SecureRandom)
  and encoded as URL-safe Base64 (43 characters, no padding).
- The database stores a SHA-256 hash of the session key as the document `_id`
raw docstring

coerce-org-authzclj

(coerce-org-authz org-authz)
source

make-storeclj

(make-store adapter & {:keys [read-only?]})

Create Ring SessionStore backed by MongoDB. adapter – an implementation of MongoAdapter. read-only? – when true, write-session and delete-session are no-ops. Defaults to false

Create Ring SessionStore backed by MongoDB.
`adapter`    – an implementation of MongoAdapter.
`read-only?` – when true, write-session and delete-session are no-ops. Defaults to false
sourceraw docstring

MongoAdaptercljprotocol

MongoDB operations adapter

MongoDB operations adapter

-get-sessionclj

(-get-session this id fields)

Return a single document map matching the given id, projecting fields. Returns nil if no document is found. Implementations must dissoc :_id from the MongoDB document so that the return value matches the SessionResult schema.

Return a single document map matching the given `id`, projecting `fields`. Returns
nil if no document is found. Implementations must dissoc `:_id` from  the MongoDB
document so that the return value matches the `SessionResult` schema.

-insert-session!clj

(-insert-session! this id session)

Execute a MongoDB insert with id as the document :_id and session as the other document data

Execute a MongoDB insert with `id` as the document :_id and `session` as the other
document data

-remove-session!clj

(-remove-session! this id)

Remove the document with the given id.

Remove the document with the given `id`.

-update-session!clj

(-update-session! this id session)

Execute a MongoDB update with query and $set the session to the document. Does NOT insert if document does not already exist.

Execute a MongoDB update with `query` and $set the `session` to the document.
Does NOT insert if document does not already exist.
sourceraw docstring

Sessionclj

Data $set on every session write.

Data $set on every session write.
sourceraw docstring

session-id->db-idclj

(session-id->db-id session-key)

Derives the database document _id from the session key by computing its SHA-256 hash

Derives the database document `_id` from the session key by computing its SHA-256 hash
sourceraw docstring

SessionResultclj

Schema for a session document read from the database.

Schema for a session document read from the database.
sourceraw docstring

with-org-authclj

(with-org-auth user)
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