atomic-server
atomic-server copied to clipboard
Use JSON Canonicalization Scheme (JCS)
Although the tests are currently passing, and most commits seem to work just fine, I'm pretty sure that there will be situations where the deterministic json-ad serialization will be different from the Typescript version.
To prevent this, I should switch to serde_jcs. Also, double check in atomic-data-browser that this spec is used as well.
Also https://docs.rs/serde_canonical_json/latest/serde_canonical_json/
Also, maybe use JSON Web Signature encoding? https://crates.io/crates/jws
See https://github.com/ontola/atomic-data/issues/35
Also, don't use base64 in URLs (because of =, / characters), maybe consider base64URL
I used serde_canonical_json. Not sure it is actually JCS, though: https://github.com/gelvinp/rs-serde_canonical_json/issues/1
EDIT: switched to serde_jcs because the other one wasnt JCS.