package FPauth-core

  1. Overview
  2. Docs

Make is a functor for creating modules of middlewares for various entities matching Auth.MODEL

Parameters

module V : Auth_sign.VARIABLES with type entity = M.t

Signature

type entity = M.t

type entity is a type of authenticatable entity equal to MODEL.t

val auth_setup : Dream.middleware

auth_setup is a middleware which controlls session, setups field variables and helper functions for downstream handlers

auth_setup tries to extract auth string from session and determine the status of authentication. If there is no auth, then there were no authentication. If auth exisits, than set_helpers checks it and manages authentication status. If something is wrong with a session, Error Error.t is returned, and in this case session is invalidated, error is logged and 401 is sent. If session is ok, Ok request is recived, and that requested is passed on.

OCaml

Innovation. Community. Security.