package sihl-user

  1. Overview
  2. Docs

Module Sihl_userSource

include module type of struct include Sihl.Contract.User end
Sourcetype error =
  1. | AlreadyRegistered
  2. | IncorrectPassword
  3. | InvalidPasswordProvided of string
  4. | DoesNotExist
Sourcetype 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;
}
Sourceexception Exception of string
Sourceval name : string
Sourceval to_sexp : t -> Sexplib0.Sexp.t
Sourceval pp : Format.formatter -> t -> unit
Sourceval of_yojson : Yojson__Safe.t -> t option
Sourceval to_yojson : t -> [> `Assoc of (string * [> `Bool of bool | `Null | `String of string ]) list ]
Sourceval confirm : t -> t
Sourceval set_user_password : t -> string -> (t, string) result
Sourceval set_user_details : t -> email:string -> username:string option -> t
Sourceval is_admin : t -> bool
Sourceval is_owner : t -> String.t -> bool
Sourceval is_confirmed : t -> bool
Sourceval matches_password : string -> t -> bool
Sourceval default_password_policy : string -> (unit, string) result
Sourceval validate_new_password : password:String.t -> password_confirmation:String.t -> password_policy:(String.t -> (unit, string) result) -> (unit, string) result
Sourceval validate_change_password : t -> old_password:string -> new_password:String.t -> new_password_confirmation:String.t -> password_policy:(String.t -> (unit, string) result) -> (unit, string) result
Sourceval make : email:string -> password:string -> username:string option -> admin:bool -> confirmed:bool -> (t, string) result
Sourceval log_src : Logs.src
Sourcemodule Logs : Logs.LOG
Sourcemodule Make (Repo : sig ... end) : Sihl.Contract.User.Sig
Sourcemodule PostgreSql : sig ... end
Sourcemodule MariaDb : sig ... end
Sourcemodule Password_reset : sig ... end
OCaml

Innovation. Community. Security.