Liking cljdoc? Tell your friends :D

geheimtur.impl.form-based


default-login-handlerclj

(default-login-handler {:keys [credential-fn form-reader login-uri
                               redirect-on-login]
                        :or {credential-fn (constantly nil)
                             form-reader identity
                             login-uri "/login"
                             redirect-on-login true}
                        :as config})

Creates a handler for POST login requests.

Optional parameters: :login-uri - a login uri where users are redirected on authentication error :form-reader - a function that given :form-params returns a map that contains :username and :password keys :credential-fn - a function that given a request context and a map of credentials returns the identity associated with them :redirect-on-login - a flag that enables redirection to :return uri, default is true

Creates a handler for POST login requests.

Optional parameters:
    :login-uri         - a login uri where users are redirected on authentication error
    :form-reader       - a function that given :form-params returns a map that contains :username and :password keys
    :credential-fn     - a function that given a request context and a map of credentials returns the identity associated with them
    :redirect-on-login - a flag that enables redirection to :return uri, default is true
raw docstring

default-logout-handlerclj

Returns a Ring response that redirects to / and unsets identity associated with corrent session.

Returns a Ring response that redirects to / and unsets identity associated with corrent session.
raw docstring

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

× close