Skip to content

51Did client parity: verify-context, redeem and the outcome types #32

Description

@jwrosewell

What is missing

Every other 51Did language package carries a client for the two step
verification, being pipeline-dotnet's DidClient with ContextOutcome,
FactorOutcome and RedeemResult, and its equivalents in Java, Node,
Python and PHP. All five were extended on 3 September 2026 to read the new
misconfigured and invaliddate outcomes (pipeline-dotnet#386,
pipeline-java#122, pipeline-node#189, pipeline-python#72,
pipeline-php-did#10).

Rust has none of it. Verified against origin/main on 3 September 2026:

  • fodid parses a 51Did without throwing and verifies the signature
    through the owid crate, and the match key rename is in (Finish the match key rename in the fodid constants #30, with
    match_key() beside the deprecated hash()).
  • fodid-cloud is a pipeline engine for creating identifiers through the
    cloud.
  • There is no verify-context call, no redeem call, no sealed result
    handling, and no outcome types anywhere in the repository.

So a Rust server can create a 51Did and check its signature, and cannot
take part in the two step verification at all.

What compliant means

A port of the DidClient surface, matched to the .NET one as the model:

  • public key fetch with per-instance caching, and offline signature
    verification against it
  • verify-context and verify-full calls
  • redeem, with the outcome types carrying verified, mismatch,
    nocontext, misconfigured, invaliddate, expired, replayed,
    unreadable and unconfirmed, and factor outcomes carrying verified,
    mismatch and misconfigured

One rule matters more than the rest, and every other port applies it: a
factor of misconfigured must be read on its own and must never fall
through to a mismatch, because it says the checking service could not
determine that factor, and reading it as a mismatch reports a replay
indicator for something the identifier says nothing about.

The question to settle first

The owid crate on crates.io is a personal publication rather than an
organisation one, so how a Rust 51Did client is published, and under what
ownership, needs deciding before the work is shaped. That is a decision for
James Rosewell rather than a technical constraint.

Produced with AI assistance under James Rosewell's direction and needs
human review.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions