package FPauth-core

  1. Overview
  2. Docs

StratResult defines results of strategies, as well as some helpful functions.

type 'a t =
  1. | Authenticated of 'a
    (*

    Entity has been authenticated successfully. Can also be used inside a strategy with bind like Ok 'a result. When returned to FPauth.Auth_sign.AUTHENTICATOR stops authentication process.

    *)
  2. | Rescue of Base.Error.t
    (*

    Authentication must be stopped immediately with an error.

    *)
  3. | Redirect of Dream.response Lwt.t
    (*

    User should be redirected in accordance with response. response promise is meant to be created by Dream.redirect

    *)
  4. | Next
    (*

    Next strategy from the list in FPauth.Auth_sign.AUTHENTICATOR should be used.

    *)

'a t defines results of strategies.

val bind : 'a t -> ('a -> 'b t) -> 'b t

bind r f returns f r if r is Authenticated and r if anything else

module Infix : sig ... end

Module with Infix operators for StratResult

OCaml

Innovation. Community. Security.