package sihl

  1. Overview
  2. Docs
type error =
  1. | AlreadyRegistered
  2. | IncorrectPassword
  3. | InvalidPasswordProvided of string
  4. | DoesNotExist
type t = {
  1. id : string;
  2. email : string;
  3. username : string option;
  4. password : string;
  5. status : string;
  6. admin : bool;
  7. confirmed : bool;
  8. created_at : Ptime.t;
  9. updated_at : Ptime.t;
}
exception Exception of string
val name : string
module type Sig = sig ... end
module Hashing : sig ... end
val to_sexp : t -> Sexplib0.Sexp.t
val pp : Stdlib.Format.formatter -> t -> unit
val of_yojson : Yojson__Safe.t -> t option
val to_yojson : t -> [> `Assoc of (string * [> `Bool of bool | `Null | `String of string ]) list ]
val confirm : t -> t
val set_user_password : t -> string -> (t, string) Stdlib.result
val set_user_details : t -> email:string -> username:string option -> t
val is_admin : t -> bool
val is_owner : t -> Stdlib.String.t -> bool
val is_confirmed : t -> bool
val matches_password : string -> t -> bool
val default_password_policy : string -> (unit, string) Stdlib.result
val validate_new_password : password:Stdlib.String.t -> password_confirmation:Stdlib.String.t -> password_policy:(Stdlib.String.t -> (unit, string) Stdlib.result) -> (unit, string) Stdlib.result
val validate_change_password : t -> old_password:string -> new_password:Stdlib.String.t -> new_password_confirmation:Stdlib.String.t -> password_policy:(Stdlib.String.t -> (unit, string) Stdlib.result) -> (unit, string) Stdlib.result
val make : email:string -> password:string -> username:string option -> admin:bool -> confirmed:bool -> (t, string) Stdlib.result
OCaml

Innovation. Community. Security.