package sihl

  1. Overview
  2. Docs
The Sihl web framework

Install

Dune Dependency

Authors

Maintainers

Sources

3.0.3.tar.gz
md5=d1502bb2a31114e33f539910bfce1139
sha512=6f5b4d1c6e6eb7c77fb483ef52eea5f69b75079830ec622a552fef33c4fe87f6a70499db9621a8fa298a80aa21649e0047aaba1b9eb53d28c2d573e1f84acf92

doc/src/sihl/contract_password_reset.ml.html

Source file contract_password_reset.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
let name = "password.reset"

module type Sig = sig
  (** [create_reset_token ?ctx email] creates and stores a reset token.

      Returns [None] if there is no user with [email]. The reset token can be
      used with [reset_password] to set the password without knowing the old
      password. *)
  val create_reset_token
    :  ?ctx:(string * string) list
    -> string
    -> string option Lwt.t

  (** [reset_password ?ctx ~token ~password ~password_confirmation] sets the
      password of a user associated with the reset [token]. *)
  val reset_password
    :  ?ctx:(string * string) list
    -> token:string
    -> string
    -> string
    -> (unit, string) Result.t Lwt.t

  val register : unit -> Core_container.Service.t

  include Core_container.Service.Sig
end
OCaml

Innovation. Community. Security.