package sihl-core

  1. Overview
  2. Docs

Module Utils.JwtSource

Sourcetype algorithm = Jwto.algorithm =
  1. | HS256
  2. | HS512
  3. | Unknown
Sourcetype t = Jwto.t
Sourcetype payload = (string * string) list
Sourceval empty : 'a list
Sourceval add_claim : key:'a -> value:'b -> ('a * 'b) list -> ('a * 'b) list
Sourceval set_expires_in : now:Ptime.t -> Time.duration -> (string * string) list -> (string * string) list
Sourceval encode : Jwto.algorithm -> secret:string -> Jwto.payload -> (string, string) result
Sourceval decode : secret:string -> string -> (Jwto.t, string) result
Sourceval get_claim : key:string -> Jwto.t -> string option
Sourceval is_expired : now:Ptime.t -> ?claim:string -> Jwto.t -> bool
Sourceval pp : Format.formatter -> Jwto.t -> unit
Sourceval eq : Jwto.t -> Jwto.t -> bool
Sourcemodule Jwto = Jwto