Liking cljdoc? Tell your friends :D

via-auth.id-password


authenticateclj

(authenticate {:keys [query-fn secret] :as authenticator}
              id
              password
              &
              {:keys [expiry] :or {expiry 24}})

Authenticates the user identified by id and password and returns a hash map with :id and :token (JWT token) in addition to any other data returned by the query-fn if the authentication is successful. A nil is returned if the authentication fails.

Authenticates the user identified by `id` and `password` and returns a hash map
with `:id` and `:token` (JWT token) in addition to any other data returned by
the query-fn if the authentication is successful. A nil is returned if the authentication
fails.
sourceraw docstring

default-secretclj

source

hash-passwordclj

(hash-password password)

Hashes password using the default algorithm (currently :bcrypt+sha512)

Hashes `password` using the default algorithm (currently :bcrypt+sha512)
sourceraw docstring

interceptorclj

source

validate-tokenclj

(validate-token {:keys [secret] :as authenticator} token)

Validates the token using authenticator

Validates the `token` using `authenticator`
sourceraw docstring

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

× close