package jose

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = {
  1. alg : Jwa.alg;
  2. jwk : Jwk.public Jwk.t option;
  3. kid : string option;
  4. x5t : string option;
  5. x5t256 : string option;
  6. typ : string option;
  7. cty : string option;
  8. enc : Jwa.enc option;
  9. extra : (string * Yojson.Safe.t) list;
}

The header has the following properties:

  • alg Jwa.alg
  • jwk JSON Web Key
  • kid Key ID - We currently always expect this to be there, this can change in the future
  • x5t X.509 Certificate SHA-1 Thumbprint -
  • x5t#S256 X.509 Certificate SHA-256 Thumbprint
  • typ Type
  • cty Content Type Not implemented

Link to RFC

Complete list of registered header parameters

val make_header : ?typ:string -> ?alg:Jwa.alg -> ?enc:Jwa.enc -> ?extra:(string * Yojson.Safe.t) list -> ?jwk_header:bool -> Jwk.priv Jwk.t -> t

make_header typ alg enc jwk if alg is not provided it will be derived from jwk. jwk_header decides if the jwk should be put in the header.

val of_string : string -> (t, [> `Msg of string ]) Stdlib.result
val to_string : t -> string
val to_json : t -> Yojson.Safe.t
val of_json : Yojson.Safe.t -> (t, [> `Msg of string ]) Stdlib.result
OCaml

Innovation. Community. Security.