package sihl

  1. Overview
  2. Docs
The modular functional web framework

Install

Dune Dependency

Authors

Maintainers

Sources

sihl-queue-0.1.6.tbz
sha256=574c73c97ea0bc57144853b28df6125855a040ef0378f3bf180b4331dde93f9d
sha512=92c474ed3b6609395799f77259fc424af37dcad53095773ca2f2cdd4757a1607a5b53b6594cd7b6ddabeb40ebba67bb9544ff0f31dc228c87cfe015afa520aaa

doc/sihl.middleware/Middleware/Authn/Make/argument-2-UserService/index.html

Parameter Make.UserService

val find_all : Core.Ctx.t -> query:Database.Ql.t -> (User__.Model.t list * Repository.Meta.t) Lwt.t
val find_opt : Core.Ctx.t -> user_id:string -> User__.Model.t option Lwt.t
val find : Core.Ctx.t -> user_id:string -> User__.Model.t Lwt.t
val find_by_email : Core.Ctx.t -> email:string -> User__.Model.t Lwt.t
val find_by_email_opt : Core.Ctx.t -> email:string -> User__.Model.t option Lwt.t
val update_password : Core.Ctx.t -> ?password_policy:(string -> (unit, string) Result.t) -> user:User__.Model.t -> old_password:string -> new_password:string -> new_password_confirmation:string -> unit -> (User__.Model.t, string) Result.t Lwt.t
val update_details : Core.Ctx.t -> user:User__.Model.t -> email:string -> username:string option -> User__.Model.t Lwt.t
val set_password : Core.Ctx.t -> ?password_policy:(string -> (unit, string) Result.t) -> user:User__.Model.t -> password:string -> password_confirmation:string -> unit -> (User__.Model.t, string) Result.t Lwt.t

Set the password of a user without knowing the old password.

This feature is typically used by admins.

val create_user : Core.Ctx.t -> email:string -> password:string -> username:string option -> User__.Model.t Lwt.t

Create and store a user.

val create_admin : Core.Ctx.t -> email:string -> password:string -> username:string option -> User__.Model.t Lwt.t

Create and store a user that is also an admin.

val register : Core.Ctx.t -> ?password_policy:(string -> (unit, string) result) -> ?username:string -> email:string -> password:string -> password_confirmation:string -> unit -> (User__.Model.t, string) Result.t Lwt.t

Create and store new user.

Provide password_policy to check whether the password fulfills certain criteria.

val login : Core.Ctx.t -> email:string -> password:string -> (User__.Model.t, string) Result.t Lwt.t

Find user by email if password matches.

OCaml

Innovation. Community. Security.