-
Notifications
You must be signed in to change notification settings - Fork 7
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
Docs/examples #151
Docs/examples #151
Conversation
5322693
to
d1fb7c4
Compare
without having reviewed the changes, i would strongly prefer if all PRs were targeted at development; if we merge directly into main, we need to rebase the commits from development onto main when the next release happens |
Sorry! forgot to change the taget branch on GitHub. this does indeed target development! |
d1fb7c4
to
6d15c0f
Compare
6d15c0f
to
0eb2699
Compare
ok the test sometimes producing legal ASN.1 structures where they should be random also needs to be addressed, but this is also a separate issue |
is this something that is introduced by this commit? i would prefer not to have randomly-failing tests in development, it builds a tolerance for red Xs |
nope, was always like that |
docs/docs/examples.md
Outdated
Now, everything is ready to be signed: | ||
|
||
```kotlin | ||
val signature = signer.sign(plainSignatureInput.encodeToByteArray()).signature //TODO: handle error |
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.
should prepareJwsSignatureInput
return ByteArray
? I don't see a use case for it returning String
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.
Well, we're talking JSON here, so everything's a string. therefore, you need this string to construct the JwsSigned.
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.
yes, but a "signature input" is bytes; the fact that those bytes contain a json representation is an implementation detail; imo prepare...SignatureInput
should return ByteArray
instead of the caller having to explicitly do string -> bytes
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 literally the string that is in the JWT. @nodh your take?
* `JwsSignes.plainsignatureInput` is now a raw ByteArray * `JwsSigned.prepareSignatureInput` now returns a raw ByteArray * Introduce `prepareDigestInput()` to `IosHomebrewAttestation` * Remove Legacy iOS Attestation
goes directly back to main, so we can re-publish docs