Skip to content

Replace mediation "MUST NOT throw" prose with [[implicitMediation]] slot#511

Open
marcoscaceres wants to merge 4 commits into
mainfrom
implicit-mediation
Open

Replace mediation "MUST NOT throw" prose with [[implicitMediation]] slot#511
marcoscaceres wants to merge 4 commits into
mainfrom
implicit-mediation

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented May 7, 2026

Copy link
Copy Markdown
Collaborator

Closes #510

Summary

Replaces the paragraph that said user agents "MUST NOT throw an error if the mediation member has a value other than required" with a proper [[implicitMediation]] internal slot declaration set to "required".

Why

The previous prose contradicted the upstream Credential Management spec's step 9, which throws TypeError for mediation: "conditional" with types that don't support it. That step fires before this spec's [[DiscoverFromExternalSource]] is called, making the "MUST NOT throw" instruction unreachable spec fiction.

WebKit's implementation already ignores mediation for digital credentials (no TypeError). This change aligns the spec with both the implementation and the upstream algorithm.

Landing order

  1. Add [[implicitMediation]] internal slot to Credential w3c/webappsec-credential-management#298 lands first (adds [[implicitMediation]] slot and modifies step 9)
  2. This PR lands second (declares the slot value for DigitalCredential)

Related

The following tasks have been completed:

  • Modified Web platform tests (pending: depends on Cred Man PR landing first)

Implementation commitment:

  • WebKit (already behaves this way — no code change needed)
  • Chromium (link to issue)
  • Gecko (link to issue)

Documentation and checks

  • Affects privacy
  • Affects security
  • Pinged MDN
  • Updated Explainer
  • Updated digitalcredentials.dev

Preview | Diff

The previous prose said user agents "MUST NOT throw an error if the
mediation member has a value other than required." This contradicted the
upstream Credential Management spec, which throws TypeError in step 9
for conditional mediation on types that don't support it. That step
fires before this spec's algorithms run, making the "MUST NOT throw"
instruction unreachable.

Replace with a declaration of [[implicitMediation]] = "required", which
the Credential Management spec will respect (per
w3c/webappsec-credential-management#298) by skipping the mediation
support checks for this credential type.

Closes #510

@mohamedamir mohamedamir left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Nice!

Comment thread index.html Outdated
Comment thread index.html Outdated
Co-authored-by: Ted Thibodeau Jr <tthibodeau@openlinksw.com>
@marcoscaceres marcoscaceres requested a review from Copilot May 12, 2026 22:24

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 updates the Digital Credentials specification’s mediation requirements by removing unreachable “MUST NOT throw” prose and instead specifying implicit required mediation via an [[implicitMediation]] internal slot value, aligning DC’s behavior with upstream Credential Management processing.

Changes:

  • Replaces the prior “MUST NOT throw” mediation paragraph with text describing implicit "required" mediation via [[implicitMediation]].
  • Updates the DigitalCredential interface introduction to reflect this mediation behavior in a single consolidated paragraph.

Comment thread index.html
Comment on lines 1440 to 1442
The <dfn>DigitalCredential</dfn> interface represents a conceptual
[=digital credential=].
</p>
Comment thread index.html
Comment on lines 1443 to +1445
<p>
The {{DigitalCredential}} interface mandates [=user mediation=] for all
operations to ensure user control and consent.
</p>
<p>
To simplify the developer experience of {{CredentialsContainer/get()}}
calls involving a {{DigitalCredential}}, [=user agents=] MUST NOT throw
an error if the {{CredentialRequestOptions/mediation}} member is absent
or has a value other than {{CredentialMediationRequirement/"required"}}.
Similarly, in {{CredentialsContainer/create()}} calls involving a
{{DigitalCredential}}, [=user agents=] MUST NOT throw an error if the
{{CredentialCreationOptions/mediation}} member is absent or has a value
other than {{CredentialMediationRequirement/"required"}}. This makes
{{CredentialMediationRequirement/"required"}} mediation an implicit and
non-overridable behavior of the API.
operations to ensure user control and consent. The {{DigitalCredential}}
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.

Replace "MUST NOT throw" mediation prose with [[implicitMediation]] slot

5 participants