Liking cljdoc? Tell your friends :D

org.bdinetwork.ring.authentication


wrap-access-tokenclj

(wrap-access-token f
                   {:keys [invalid-token-response]
                    :or {invalid-token-response {:status status/unauthorized
                                                 :body "Invalid access token"}}
                    :as opts})

Middleware to set client-id from access-token.

Fetches access token as bearer token from authorization header. Sets :client-id on request if a valid access token is passed. If no bearer token is passed, passes request as is.

If access token is invalid, return "401 Unauthorized" response, configurable in opts as invalid-token-response.

Middleware to set client-id from access-token.

Fetches access token as bearer token from authorization header.
Sets `:client-id` on request if a valid access token is passed. If
no bearer token is passed, passes request as is.

If access token is invalid, return "401 Unauthorized" response,
configurable in `opts` as `invalid-token-response`.
sourceraw docstring

wrap-authenticationclj

(wrap-authentication f {:keys [private-key server-id] :as opts})

Middleware to add authentication and a /connect/token endpoint.

See also wrap-access-token and wrap-client-assertion.

Middleware to add authentication and a `/connect/token` endpoint.

See also `wrap-access-token` and `wrap-client-assertion`.
sourceraw docstring

wrap-client-assertionclj

(wrap-client-assertion f opts)

Provide a /connect/token endpoint.

It requires both ring.middleware.json/wrap-json-response and ring.middleware.params/wrap-params to function and expects an association on the request which implements org.bdinetwork.association/Association.

Provide a `/connect/token` endpoint.

 It requires both `ring.middleware.json/wrap-json-response` and
`ring.middleware.params/wrap-params` to function and expects an
`association` on the request which implements
`org.bdinetwork.association/Association`.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close