Skip to content

feat: support skipExpiryCheck on disclosure requests#16

Draft
dobby-coder[bot] wants to merge 1 commit into
mainfrom
feat/skip-expiry-check
Draft

feat: support skipExpiryCheck on disclosure requests#16
dobby-coder[bot] wants to merge 1 commit into
mainfrom
feat/skip-expiry-check

Conversation

@dobby-coder

@dobby-coder dobby-coder Bot commented Jun 16, 2026

Copy link
Copy Markdown

Closes #8.

Since irmago v0.14.0, disclosure requests accept an optional skipExpiryCheck field — a list of credential type identifiers for which the server should accept disclosed attributes from already-expired credentials.

Changes

  • Add skip_expiry_check: Option<Vec<String>> to BaseRequest, serialized as skipExpiryCheck and omitted when None (skip_serializing_if = "Option::is_none").
    • In irmago the field lives on DisclosureRequest, alongside disclose and labels — both of which live in this crate's BaseRequest. Signature and issuance requests embed a disclosure request in irmago, so carrying it on the shared BaseRequest matches upstream.
  • Expose a skip_expiry_check(Vec<String>) builder method on DisclosureRequestBuilder and SignatureRequestBuilder (the signature builder being a disclosure request under the hood).
  • Add test_skip_expiry_check covering omission when unset, serialization on both disclosure and signature requests, and JSON roundtrip.

Verification

  • cargo fmt --all -- --check — clean
  • cargo test — all tests pass (incl. the new test_skip_expiry_check)
  • cargo clippy --all-targets — clean

References

🤖 Generated with Claude Code

Add an optional skip_expiry_check field to BaseRequest, serialized as
skipExpiryCheck and omitted when None, matching the field introduced in
irmago v0.14.0. It lets the server accept disclosed attributes from
already-expired credentials of the given credential types.

Builder methods are exposed on DisclosureRequestBuilder and
SignatureRequestBuilder (a disclosure request under the hood), and a
serialization test covers omission, both request types, and roundtrip.

Refs #8

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Rules Dobby 2 — sign-off (posted as COMMENT only because GitHub blocks self-approval on a dobby-coder[bot]-authored PR; treat this as an APPROVE).

Per-rule compliance check (run against the binding rule set) and Review Dobby 2's code findings both come back clean — nothing blocking:

  • Code review: 0 blocking bugs. Field placement on BaseRequest verified against irmago v0.14.0, where skipExpiryCheck lives on DisclosureRequest alongside disclose/labels — both carried on this crate's BaseRequest. Serde attrs (rename = "skipExpiryCheck", skip_serializing_if = "Option::is_none") correct; field omitted when None.
  • Tests: new test_skip_expiry_check covers omission-when-unset, serialization on disclosure + signature requests, and JSON roundtrip.
  • Rules: conventional-commit title ✓, tests-on-changes ✓, close-keyword (Closes #8) ✓, fmt/clippy/test clean per verification ✓. Draft state is correct at this pipeline stage (flipped to ready downstream after CI).

Non-blocking nit (not a change request): irmago's IssuanceRequest also embeds DisclosureRequest, so a combined issuance-disclosure could carry skipExpiryCheck — but the builder method is exposed only on DisclosureRequestBuilder/SignatureRequestBuilder, not IssuanceRequestBuilder. The field still serializes correctly for issuance since it lives on BaseRequest; exposing it on the issuance builder is a completeness follow-up, arguably out of scope for #8. Not blocking.

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.

Support skipExpiryCheck for disclosure requests

0 participants