Jose.Jws
Link to RFC
type signature = string
type t = {
header : Header.t;
raw_header : string;
payload : string;
signature : signature;
}
type serialization = [
| `Compact
| `General
| `Flattened
]
val of_string : string -> (t, [> `Msg of string | `Not_json | `Not_supported ]) Stdlib.result
val to_string : ?serialization:serialization -> t -> string
val validate : jwk:'a Jwk.t -> t -> (t, [> `Invalid_signature | `Msg of string ]) Stdlib.result
validate jwk t validates the signature
validate jwk t
val sign : ?header:Header.t -> payload:string -> Jwk.priv Jwk.t -> (t, [> `Msg of string ]) Stdlib.result
sign header payload priv creates a signed JWT from header and payload
sign header payload priv
header
payload
We will start using a private JWK instead of a Mirage_crypto_pk.Rsa.priv soon