package sihl

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

Parameters

Signature

include Core.Container.SERVICE
val lifecycle : Core__.Core_container.Lifecycle.t
val start : Core__.Core_ctx.t -> Core__.Core_ctx.t Lwt.t
val stop : Core__.Core_ctx.t -> unit Lwt.t
val create : Core.Ctx.t -> kind:string -> ?data:string -> ?expires_in:Utils.Time.duration -> unit -> Token__.Token_core.t Lwt.t

Create a token and store a token.

Provide expires_in to define a duration in which the token is valid, default is one day. Provide data to store optional data as string.

val find : Core.Ctx.t -> string -> Token__.Token_core.t Lwt.t

Returns an active and non-expired token.

val find_opt : Core.Ctx.t -> string -> Token__.Token_core.t option Lwt.t

Returns an active and non-expired token.

OCaml

Innovation. Community. Security.