-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use Jose #31
base: main
Are you sure you want to change the base?
Use Jose #31
Conversation
81aad67
to
86dfcb0
Compare
@@ -8,7 +8,7 @@ let sha256_and_base64 a = Primitives.sha256 a |> B64u.urlencode | |||
|
|||
let ( let* ) = Result.bind | |||
|
|||
module J = Yojson.Basic | |||
module J = Yojson.Safe |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the other big change, moving from Basic
to Safe
since that's what is "supposed" to be used and also what Jose
uses.
86dfcb0
to
6942d3e
Compare
6942d3e
to
62d15b0
Compare
I'm not against deleting code but your PR adds a new dependency to |
I understand your point of view, |
Thanks @ulrikstrid for the PR. I also think that deduplicating code is a good path forward. Unfortunately I've not found the time to review this PR (and look whether it increases dramatically build times or binary sizes). |
No problem @hannesm, Jose had landed the needed improvements and I fixed some mirage-unfriendlyness while I was at it. |
Needs a release of
jose
with the changes (ulrikstrid/ocaml-jose#56). Release is here: ocaml/opam-repository#23366Since most of the tests are already in Jose we can remove them from here and I should also cleanup the code a bit extra to remove unsafe things.The test data is changed because Jose generates slightly different headersThe two big changes (except for the obvious code removal) is:
Yojson.Safe.t
instead ofYojson.Basic.t
.Jose.Jwk.priv Jose.Jwk.t
instead of aX509.Private_key.t
. This is easily changed back however and we can hide that detail if we want to.