Repository navigation
Conversation
There was a problem hiding this comment.
Claude Code Review
This repository is configured for manual code reviews. Comment @claude review for a one-time review, or @claude review always to subscribe this PR to a review on every future push.
Tip: disable this comment in your organization's Code Review settings.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 9f28f4d6cd
ℹ️ 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".
| val required = effectiveRequestedAttributePaths() | ||
| return ClaimSelection.All( | ||
| required = required.mapTo(linkedSetOf(), toClaim), | ||
| ifAvailable = (effectiveRequestedOptionalAttributePaths() - required).mapTo(linkedSetOf(), toClaim), |
There was a problem hiding this comment.
Deduplicate paths after VC-JWT qualification
When a VC-JWT claim is required using its relative form (for example, ["given_name"]) and also optional using its already-qualified form (["credentialSubject", "given_name"]), the subtraction here treats them as different paths, but toClaim then normalizes both to the same JsonClaimReference. ClaimSelection.All consequently throws for overlapping required and optional claims instead of treating the claim as required as documented. Map both sets through toClaim before removing the required claims from the optional set.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
do we have tests for this?
JesusMcCloud
left a comment
There was a problem hiding this comment.
I like it very much, but it would be nice to test the claim made by codex (and act accordingly)
| * to be used in [OpenId4VpRequestOptions]: a DCQL query (OpenID4VP 1.0, 6) with [toDCQLRequest], | ||
| * or an ISO `DeviceRequest` (ISO/IEC 18013-5:2021, 8.3.2.1.2.1) with [toIsoDeviceRetrievalRequest]. | ||
| */ | ||
| data class CredentialPresentationRequestBuilder( |
There was a problem hiding this comment.
not related to this PR but why is this eve a data class?
| val required = effectiveRequestedAttributePaths() | ||
| return ClaimSelection.All( | ||
| required = required.mapTo(linkedSetOf(), toClaim), | ||
| ifAvailable = (effectiveRequestedOptionalAttributePaths() - required).mapTo(linkedSetOf(), toClaim), |
There was a problem hiding this comment.
do we have tests for this?
9f28f4d to
3ef3513
Compare
|
@codex review again |
|
Codex Review: Didn't find any major issues. 👍 Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
d23e316 to
e9df462
Compare
e9df462 to
0064fae
Compare
Add RequestedCredential.SdJwt, VcJwt and Mdoc, each with its type identifier, a claim selection and the ID of its DCQL credential query, constructed from a raw identifier or a typed credential scheme, with vararg constructors requesting every given claim. ClaimSelection.All holds the required claims and the claims requested if the holder's credential contains them, as one bundle. Mdoc.toDocRequest builds the ISO DocRequest of the required data elements, with intentToRetain per data element, as a DocRequest marks none as optional. Claims reuse JsonClaimReference and MdocClaimReference: JsonClaimReference becomes a data class, so it can be a vararg parameter and its constructors can be called from Java; its JSON form is unchanged. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ClaimSelection.Alternatives requests the common claims and exactly one of its options, alternative claim combinations in the order of the verifier's preference (OpenID4VP 1.0, 6.4.1). Mdoc.toDocRequest rejects alternatives, which an ISO ItemsRequest can not express. Claims are sets, as their order within a claim combination means nothing: a claim passed twice is requested once. The options of alternatives stay a list, as their order is the preference. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
RequestedPresentation requests credentials as sets of alternative credential combinations (OpenID4VP 1.0, 6.2, 6.4.2): RequestedCredentialSet .oneOf for a required set, .optional for an optional one, and RequestedPresentation.allOf for requiring every credential. Its credentials are the Credential Queries, each once; different credentials sharing an ID are rejected (OpenID4VP 1.0, 6.1). Also word the failure of Mdoc.toDocRequest without data elements as what is wrong. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
CredentialPresentationRequestBuilder holds a RequestedPresentation and builds its DCQL query with claims, claim_sets and credential_sets (OpenID4VP 1.0, 6.1 to 6.4): claims requested if available are one bundle, [required + ifAvailable] or [required]; alternatives are one claim combination per option. The ISO DeviceRequest accepts only mdocs that are all required, with required data elements, and requests only those. RequestOptionsCredential.toRequestedCredential bridges the old request options: optional attribute paths are requested if available instead of being required, and a scheme without the type identifier of the representation fails instead of being dropped. A collection of request options is passed with fromRequestOptions, as its constructor would clash with the one taking requested credentials. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0064fae to
557e7b1
Compare
Adds data classes to represent the possibilities of building DCQL queries, credential sets and claim sets.