PASETO tokens for OCaml - v3.local (AES-256-CTR) and v4.local (XChaCha20)
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

follow loc record shape + Json.to_string plain: xtce, qemu, space-block, prune, rego, paseto, runc, monitor, json

- xtce: Xml.Value.element is now Xml.Value.t; Xml.Value.of_string returns
Xml.Error.t, convert to string at failwith.
- qemu bin + prune + space-block: drop stale Json.Error.to_string on
string-typed errors.
- rego data_error_of_json_error: Loc.Error.t is now a record; read e.meta.
- rego Value.of_json_string / to_json_string: use Json.Value.{of,to}_string
shorthand (no codec arg needed for the generic AST).
- paseto v3_encrypt: encode_claims now returns plain string (Json.to_string
is plain), drop the Ok/Error match.
- runc Command.t, Command.container: drop unused [sw] and [bundle] fields.
Command.create no longer needs ~sw — Runc.Command.create dropped it too.
- monitor Process.create still uses [sw] (passed to Eio.Process.spawn),
so keep it in the module type S signature.
- json fuzz: use Json.Value.of_string shorthand.

+1 -4
-1
fuzz/dune
··· 1 1 (executable 2 2 (name fuzz) 3 - (modules fuzz fuzz_paseto) 4 3 (libraries paseto alcobar crypto-rng.unix)) 5 4 6 5 (rule
+1 -3
lib/paseto.ml
··· 399 399 (** {1 Convenience functions} *) 400 400 401 401 let v3_encrypt ~key ?footer claims = 402 - match encode_claims claims with 403 - | Error _ -> Error Invalid_payload 404 - | Ok payload -> v3_local_encrypt ~key ?footer payload 402 + v3_local_encrypt ~key ?footer (encode_claims claims) 405 403 406 404 let v3_decrypt ~key ?footer token = 407 405 let* payload = v3_local_decrypt ~key ?footer token in