ProtoRune. Security. TokenStore. Dets
(proto_rune v0.5.1)
Copy Markdown
DETS-based ProtoRune.Security.TokenStore backend.
Stores encrypted token blobs in a single :dets table file. DETS is
part of the OTP standard library, so this backend has no extra
dependencies. The table file is restricted to mode 0o600 after
creation.
The table is opened and closed on every call, so no process owns it between operations. Note that DETS allows only one process to have a given file open at a time: concurrent calls against the same path are serialized by the caller, not by this backend.
Options
:path- path of the DETS table file. Defaults toPath.join(:filename.basedir(:user_cache, "proto_rune"), "tokens.dets").
Examples
store = {ProtoRune.Security.TokenStore.Dets, path: "/var/myapp/tokens.dets"}
:ok = ProtoRune.Security.save_session(session, key, store)