Middleware related to enforcing authentication/API keys (when applicable). Unlike most other middleware most of this
is not used as part of the normal app
; it is instead added selectively to appropriate routes.
Middleware related to enforcing authentication/API keys (when applicable). Unlike most other middleware most of this is not used as part of the normal `app`; it is instead added selectively to appropriate routes.
(enforce-api-key handler)
Middleware that enforces validation of the client via API Key, canceling the request processing if the check fails.
Validation is handled by first checking for the presence of the :metabase-api-key
on the request. If the api key
is available then we validate it by checking it against the configured :mb-api-key
value set in our global config.
If the request :metabase-api-key
matches the configured :mb-api-key
value then the request continues, otherwise
we reject the request and return a 403 Forbidden response.
Middleware that enforces validation of the client via API Key, canceling the request processing if the check fails. Validation is handled by first checking for the presence of the `:metabase-api-key` on the request. If the api key is available then we validate it by checking it against the configured `:mb-api-key` value set in our global config. If the request `:metabase-api-key` matches the configured `:mb-api-key` value then the request continues, otherwise we reject the request and return a 403 Forbidden response.
(enforce-authentication handler)
Middleware that returns a 401 response if REQUEST has no associated :metabase-user-id
.
Middleware that returns a 401 response if REQUEST has no associated `:metabase-user-id`.
(wrap-api-key handler)
Middleware that sets the :metabase-api-key
keyword on the request if a valid API Key can be found. We check the
request headers for X-METABASE-APIKEY
and if it's not found then then no keyword is bound to the request.
Middleware that sets the `:metabase-api-key` keyword on the request if a valid API Key can be found. We check the request headers for `X-METABASE-APIKEY` and if it's not found then then no keyword is bound to the request.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close