(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.
(authentication-result->action authentication-result)
(default-unauthorized-response)
(default-unauthorized-response request)
(extract-identity id-token)
(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.
(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.
(request-refresh-tokens request)
(revoke-refresh-tokens! request)
(sign-up! request authentication-result)
(sign-up! request
{:keys [user auth-record] :as authentication-result}
{:keys [attempts] :or {attempts 3}})
(success-tokens-response request authentication-result user-id)
(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.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close