package FPauth-core
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page
Module Router.MakeSource
Make creates an instance of Router with all its dependencies
Parameters
module M : Auth_sign.MODELmodule A : Auth_sign.AUTHENTICATOR with type entity = M.tmodule V : Auth_sign.VARIABLESSignature
strategy is a function that authenticates an entity from a request.
Source
val login_handler :
strategy Base.list ->
(module Auth_sign.RESPONSES) ->
Dream.request ->
Dream.response Lwt.tlogin_handler gets strats and redponses, starts authentication and handles its results
logout_handler loguts authenticated user
Source
val call :
?root:Base.string ->
responses:(module Auth_sign.RESPONSES) ->
extractor:Static.Params.extractor ->
strategy Base.list ->
Dream.routecall ?root ~responses ~extractor strat_list creates routes for authentication and added to Dream.router.
Has some basic routes:
- "/auth" is an entrypoint for authentication. Runs all
strategiesin order they were supplied inAuth_sign.AUTHENTICATOR.authenticate. Handles the results and calls corresponding handlers fromAuth_sign.RESPONSES. - "/logout" completes logout with
Authenticator.logoutand responses withAuth_sign.RESPONSES.logout
extractor defines how to extract params from requests for basic routes. See Static.Params.extractor.
responses define how to respond on these basic routes after handling authentication processes.
?root defines the root for all authentication-related routes. Default is "/".
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
On This Page