Full implementation of all three JWS serialization shapes#419
Full implementation of all three JWS serialization shapes#419n0900 wants to merge 39 commits intodevelopmentfrom
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 56f6601f79
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/Jws.kt
Show resolved
Hide resolved
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
1 similar comment
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
JesusMcCloud
left a comment
There was a problem hiding this comment.
should not be serailiazable. Otherwise, I like the semantics and how it is constructed, so keep the class but get rid of it being serializable
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsSigned.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/Jws.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Outdated
Show resolved
Hide resolved
...spensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsFlattened.kt
Outdated
Show resolved
Hide resolved
...spensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsFlattened.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsHeader.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsHeader.kt
Outdated
Show resolved
Hide resolved
...e-josef/src/commonTest/kotlin/at/asitplus/signum/indispensable/josef/JwsSerializationTest.kt
Outdated
Show resolved
Hide resolved
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
1 similar comment
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review please |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c5087659e1
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Show resolved
Hide resolved
08c30cb to
384d6ff
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
JesusMcCloud
left a comment
There was a problem hiding this comment.
Minor API tweak requested
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsCompact.kt
Show resolved
Hide resolved
...spensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsFlattened.kt
Outdated
Show resolved
Hide resolved
indispensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsGeneral.kt
Show resolved
Hide resolved
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
2 similar comments
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
b5f443d to
35c72bd
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@codex review please, you can do that! |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 35c72bd98e
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| @SerialName(SerialNames.HEADER) | ||
| val unprotectedHeader: JwsHeader.Part? = null, |
There was a problem hiding this comment.
Preserve unknown unprotected header parameters
Because header is deserialized into JwsHeader.Part while joseCompliantSerializer has ignoreUnknownKeys = true, any unprotected header parameter that is not modeled in Part is silently discarded. A flattened/general JWS like {"header":{"alg":"RS256","foo":"bar"},...} will therefore lose foo when it is parsed and then re-encoded or converted, even though RFC 7515 allows application-defined header parameters there. The protected side is preserved as raw bytes, so this refactor makes JSON JWS round-tripping asymmetric only for unprotected headers.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
This is true. Private Header Parameters will be supported when the use-case arises.
There was a problem hiding this comment.
we should document this fact
...spensable-josef/src/commonMain/kotlin/at/asitplus/signum/indispensable/josef/JwsFlattened.kt
Outdated
Show resolved
Hide resolved
…alization in tact
b17815f to
bbf285a
Compare
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
Implements three new classes
JwsCompact,JwsFlattenedandJwsGeneralto implement RFC 7515 Section 3.1, 7.2.1 and 7.2.2 respectively.Removed generic parameter as present in
JwsSignedwhich will be deprecated. Payload can still be serialized into a specific structure at runtime. Serialization stability is now guaranteed by handling all signature related parameters as bytearrays and deserializing into transient properties only.