Liking cljdoc? Tell your friends :D

re-frame-auth.core


auth-handlerclj

(auth-handler request
              authenticator
              &
              [{:keys [actions tx-new-user allow-new-user? allow-login?
                       unauthorized-response]
                :or {actions #{:auth/create :auth/login}
                     tx-new-user identity
                     allow-new-user? (constantly true)
                     allow-login? (constantly true)
                     unauthorized-response default-unauthorized-response}}])

Given a 'request' and an 'authenticator', attempt to authenticate. The result of the authentication is an :auth-flow/result as defined in re-frame-auth.flows.core under the spec section.

Either an unauthorized response or a response with auth tokens is returned.

Given a 'request' and an 'authenticator', attempt to authenticate. The result
of the authentication is an :auth-flow/result as defined in
re-frame-auth.flows.core under the spec section.

Either an unauthorized response or a response with auth tokens is returned.
raw docstring

authentication-result->actionclj

(authentication-result->action authentication-result)

default-unauthorized-responseclj

(default-unauthorized-response)
(default-unauthorized-response request)

extract-identityclj

(extract-identity id-token)

logout-handlerclj

(logout-handler request)

When called, unset all authentication cookies if they exist, and expire the refresh token if present. Return no tokens in response.

When called, unset all authentication cookies if they exist, and expire the
refresh token if present. Return no tokens in response.
raw docstring

process-authentication-resultcljmultimethod


refresh-handlerclj

(refresh-handler request
                 refresher
                 &
                 [{:keys [unauthorized-response allow-refresh?]
                   :or {unauthorized-response default-unauthorized-response
                        allow-refresh? (constantly true)}}])

This endpoint is used strictly to generate new access tokens given a valid or expired access token and a valid refresh token. When accepted, a new access token is delivered alongside the same refresh token, with its expiry bumped up.

This endpoint is used strictly to generate new access tokens given a valid
or expired access token and a valid refresh token. When accepted, a new access
token is delivered alongside the same refresh token, with its expiry bumped
up.
raw docstring

request-refresh-tokensclj

(request-refresh-tokens request)

revoke-refresh-tokens!clj

(revoke-refresh-tokens! request)

sign-up!clj

(sign-up! request authentication-result)
(sign-up! request
          {:keys [user auth-record] :as authentication-result}
          {:keys [attempts] :or {attempts 3}})

success-tokens-responseclj

(success-tokens-response request authentication-result user-id)

wrap-authenticationclj

(wrap-authentication handler
                     &
                     {:keys [token-generators auth-store user-store on-event
                             cookie-options]
                      :or {on-event default-event-handler}
                      :as args})

At a minimum, an 'auth-store' and 'user-store' must be provided, and an :access-token and :id-token generator must each be provided.

At a minimum, an 'auth-store' and 'user-store' must be provided, and an
:access-token and :id-token generator must each be provided.
raw docstring

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

× close