Who is asking — as a seam, not a decision.
This store never authenticates anyone. A deployment already has an identity
system: OIDC, a session cookie, an API key, a signed header from a gateway.
It supplies an identify-fn of the request that yields
{:customer/ref :customer/email} or nil, and the boundary upserts a customer
from that.
Two implementations ship: one for a demo and one for machine clients. Neither is an authentication system, and both say so.
Who is asking — as a seam, not a decision.
This store never authenticates anyone. A deployment already has an identity
system: OIDC, a session cookie, an API key, a signed header from a gateway.
It supplies an `identify-fn` of the request that yields
{:customer/ref :customer/email} or nil, and the boundary upserts a customer
from that.
Two implementations ship: one for a demo and one for machine clients. Neither
is an authentication system, and both say so.(anonymous)Identity that never resolves anyone. The default, and the safe one.
Identity that never resolves anyone. The default, and the safe one.
(bearer-token request)The bearer credential a request presents, or nil.
The bearer credential a request presents, or nil.
(header-identity)(header-identity {:keys [header] :or {header "x-customer-ref"}})Identity from a request header. NO AUTHENTICATION WHATSOEVER.
Whoever sets the header is whoever they say they are. It exists so the
template runs end to end before a deployment has wired its own identity, and
behind a gateway that has already authenticated the caller and is asserting
the result. system/start! refuses to use it unless the deployment says so
out loud.
Identity from a request header. NO AUTHENTICATION WHATSOEVER. Whoever sets the header is whoever they say they are. It exists so the template runs end to end before a deployment has wired its own identity, and behind a gateway that has already authenticated the caller and is asserting the result. `system/start!` refuses to use it unless the deployment says so out loud.
(operator? admin-token request)True when request carries the configured operator token.
Constant time, and an unconfigured token accepts nothing: an operator surface that fails open is worse than no operator surface.
True when `request` carries the configured operator token. Constant time, and an unconfigured token accepts nothing: an operator surface that fails open is worse than no operator surface.
(token-identity tokens)Identity from a static map of bearer token -> {:customer/ref :customer/email}.
For machine clients and for tests. Tokens are compared in constant time, and an empty map identifies nobody.
Identity from a static map of bearer token -> {:customer/ref :customer/email}.
For machine clients and for tests. Tokens are compared in constant time, and
an empty map identifies nobody.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 |