(decode-enter-sync ctx required? check-header unauthorized keyset unsign-opts)
(decode-interceptor get-keyset-fn
&
{:keys [required? check-header unauthorized async?
keyset-blocking? unsign-opts]
:or {required? true
check-header "authorization"
unauthorized default-unauthorized
async? false
keyset-blocking? false
unsign-opts {}}})
Given a function that returns a map of public keys, return an interceptor that decodes claims and stores them on the context as :com.yetanalytics.pedestal-oidc/claims.
If :async? is true, the function is expected to return a channel unless :keyset-blocking? is also true in which case it will be run in a thread.
Other options:
:required? - Return a 401 unless valid claims are present. :unauthorized - A function that will receive the context map to handle a 401, a failure keyword and possibly an exception. :check-header - the header to check for the access token. :unsign-opts - extra options to pass to buddy-sign.
Given a function that returns a map of public keys, return an interceptor that decodes claims and stores them on the context as :com.yetanalytics.pedestal-oidc/claims. If :async? is true, the function is expected to return a channel unless :keyset-blocking? is also true in which case it will be run in a thread. Other options: :required? - Return a 401 unless valid claims are present. :unauthorized - A function that will receive the context map to handle a 401, a failure keyword and possibly an exception. :check-header - the header to check for the access token. :unsign-opts - extra options to pass to buddy-sign.
(default-unauthorized ctx failure & [?ex_])
Default handler for any failure. Will receive a failure keyword and possibly an exception
Default handler for any failure. Will receive a failure keyword and possibly an exception
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close