auth: forward credential_details as base body of OpenID4VCI Credential Request#4236
Open
auth: forward credential_details as base body of OpenID4VCI Credential Request#4236
Conversation
…l Request
Adds an optional credential_details JSON object to POST /internal/auth/v2/{subjectID}/request-credential.
The node uses it as the base body of the outgoing OpenID4VCI Credential Request and overlays its own
JWT proof on top. Lets the wallet integrate with issuers (e.g. AET SDK) that accept additional fields
in the Credential Request body beyond what OpenID4VCI v1.0 defines.
Closes #4233
Assisted by AI
3 new issues
|
|
Coverage Impact ⬆️ Merging this pull request will increase total coverage on Modified Files with Diff Coverage (3)
🛟 Help
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Closes #4233.
Summary
credential_details(JSON object) toPOST /internal/auth/v2/{subjectID}/request-credential.proofis overwritten.OAuthSession.CredentialRequestDetailsbetween the redirect and credential-fetch steps.CredentialRequestGo struct is replaced with amap[string]anybody construction so callers can carry issuer-specific fields (e.g. AET'sdid/bsn/ura) without code changes per issuer.credential_details; see OpenID4VCI: Add credential_details passthrough on the credential-issuance API #4233 for the trade-off discussion.Wire body
Final body sent to the issuer's Credential Endpoint:
Test plan
TestWrapper_RequestOpenid4VCICredentialIssuanceandTestWrapper_handleOpenID4VCICallbackstill greenok - credential_details persisted into sessionasserts the field round-trips through the session storeok - credential_details from session forwarded to credential endpointasserts the value reaches the credential clientTestHTTPClient_VerifiableCredentials_RequestBodyasserts the wire body shape: default ={proof}, with details = AET-style passthrough, caller-supplied proof is overwrittengo build ./...,go vet ./auth/...,go test ./auth/... ./vcr/...Assisted by AI