package sihl

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module Service.MakeSource

Parameters

Signature

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

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

This feature is typically used by admins.

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

Create and store a user.

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

Create and store a user that is also an admin.

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

Create and store new user.

Provide password_policy to check whether the password fulfills certain criteria.

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

Find user by email if password matches.

OCaml

Innovation. Community. Security.