package guardian

  1. Overview
  2. Docs

TODO: optional ctx arguments are ignored by sqlite backend

Parameters

Signature

module Guardian : sig ... end
module Uuid = Guardian.Uuid
module ActorSet = Guardian.ActorRoleSet

TODO: generalize this. right now it's fine because this backend should really only be used for testing purposes, but in the future it would be nice to have actual sqlite3 support.

module TargetSet = Guardian.TargetRoleSet
val db : Sqlite3.db
module Backend : sig ... end
include sig ... end
type actor_role_set = Guardian.ActorRoleSet.t
type target_role_set = Guardian.TargetRoleSet.t
type !'a authorizable = 'a Guardian.Authorizable.t
type !'b authorizable_target = 'b Guardian.AuthorizableTarget.t
type ('rv, 'err) monad = ('rv, 'err) Lwt_result.t
val find_migrations : unit -> (string * string * string) list
val find_clean : unit -> (string * string) list
val migrate : ?ctx:(string * string) list -> unit -> unit Lwt.t
val clean : ?ctx:(string * string) list -> unit -> unit Lwt.t
module Actor : sig ... end
module Target : sig ... end
val wrap_function : ?ctx:(string * string) list -> (string -> 'etyp) -> ([ `Create | `Read | `Update | `Delete | `Manage ] * target_spec) list -> ('param -> ('rval, 'etyp) monad) -> ('a authorizable -> 'param -> ('rval, 'etyp) monad, string) monad
val collect_rules : ?ctx:(string * string) list -> ([ `Create | `Read | `Update | `Delete | `Manage ] * target_spec) list -> (auth_rule list, string) monad
val checker_of_effects : ?ctx:(string * string) list -> ([ `Create | `Read | `Update | `Delete | `Manage ] * target_spec) list -> 'a authorizable -> (unit, string) monad
val find_rules_exn : ?ctx:(string * string) list -> target_spec -> auth_rule list Lwt.t
val save_rule_exn : ?ctx:(string * string) list -> auth_rule -> unit Lwt.t
val delete_rule_exn : ?ctx:(string * string) list -> auth_rule -> unit Lwt.t
OCaml

Innovation. Community. Security.