(token-authenticate {:keys [token-fn credential-fn]
:or {token-fn bearer-token-parser
credential-fn (constantly nil)}})Creates token-based authentication handler.
Optional parameters: :token-fn - a function that given a request context returns the token associated with it :credential-fn - a function that given a request context and an authentication token returns the identity associated with it
Creates token-based authentication handler.
Optional parameters:
:token-fn - a function that given a request context returns the token associated with it
:credential-fn - a function that given a request context and an authentication token returns the identity associated with it(token-error-handler {:keys [error-fn] :or {error-fn default-error-handler}})The default handler for token-based authentication/authorization errors.
Optional parameters: :error-fn - a function that given a request context and an authentication error returns a corresponding HTTP response
The default handler for token-based authentication/authorization errors.
Optional parameters:
:error-fn - a function that given a request context and an authentication error returns a corresponding HTTP responsecljdoc 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 |