Skip to content

fix(verifier): use credential format from metadata for custom presentation requests - #522

Merged
masv3971 merged 1 commit into
SUNET:mainfrom
sirosfoundation:fix/verifier-custom-mdoc-format
Jul 29, 2026
Merged

fix(verifier): use credential format from metadata for custom presentation requests#522
masv3971 merged 1 commit into
SUNET:mainfrom
sirosfoundation:fix/verifier-custom-mdoc-format

Conversation

@leifj

@leifj leifj commented Jul 23, 2026

Copy link
Copy Markdown
Contributor

Custom presentation requests in the verifier UI always hard-coded the DCQL credential format to "dc+sd-jwt". This broke mDoc credentials (e.g. org.iso.18013.5.1.mDL), which must use mso_mdoc.

  • Include Format in UICredentialInfo returned by /ui/metadata.
  • Propagate the format through the UI credential selection state.
  • Build the custom DCQL credential using the selected credential's actual format instead of the hard-coded default.

Fixes #521

…ation requests

Custom presentation requests in the verifier UI always hard-coded the
DCQL credential format to "dc+sd-jwt". This broke mDoc credentials
(e.g. org.iso.18013.5.1.mDL), which must use "mso_mdoc".

- Include Format in UICredentialInfo returned by /ui/metadata.
- Propagate the format through the UI credential selection state.
- Build the custom DCQL credential using the selected credential's
  actual format instead of the hard-coded default.

Fixes SUNET#521
@sonarqubecloud

Copy link
Copy Markdown

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR fixes the verifier UI’s custom presentation request builder so it uses the credential format provided by /ui/metadata instead of always hard-coding dc+sd-jwt, which previously broke mDoc requests that require mso_mdoc (Fixes #521).

Changes:

  • Extend /ui/metadata to include format per credential (UICredentialInfo.Format).
  • Propagate the selected credential’s format through the UI selection state.
  • Generate custom DCQL queries using the selected credential’s actual format rather than a hard-coded default.

Reviewed changes

Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.

File Description
internal/verifier/staticembed/presentation-definition.js Adds format to credential metadata parsing/state and uses it when constructing the custom DCQL credential.
internal/verifier/apiv1/handlers_ui.go Includes Format in the UI credential metadata response derived from configured credential metadata.
internal/verifier/apiv1/handlers_ui_test.go Updates/extends tests to assert that credential format is exposed to the UI from metadata (including an mDoc case).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.

@masv3971
masv3971 merged commit 2cd18d2 into SUNET:main Jul 29, 2026
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Verifier: Custom presentation requests broken for mDoc

3 participants