Skip to content

Move [[origin]] into Credential's dfn list#296

Open
marcoscaceres wants to merge 1 commit into
mainfrom
origin-slot-dfn-list
Open

Move [[origin]] into Credential's dfn list#296
marcoscaceres wants to merge 1 commit into
mainfrom
origin-slot-dfn-list

Conversation

@marcoscaceres

@marcoscaceres marcoscaceres commented May 7, 2026

Copy link
Copy Markdown
Member

Closes #295

Summary

  • Moves the [[origin]] internal slot definition from a floating prose paragraph into the formal dfn list alongside [[type]] and [[discovery]]
  • Makes [[origin]] universally present on all Credential objects (default: null)
  • Redefines "origin bound" as: a credential whose [[origin]] slot is not null
  • Clarifies that PasswordCredential and FederatedCredential set [[origin]] to the caller's origin at creation time
  • Subtypes that don't use origin-binding (e.g., PublicKeyCredential) leave it as null

Rationale

The previous pattern (conditionally present slot) was unusual and didn't match how [[type]] and [[discovery]] are specified. A universal slot with a null default:

  • Makes the data model uniform
  • Allows generic algorithms to check credential.[[origin]] without first checking if the credential type is "origin bound"
  • Fits the dfn list pattern already established for other Credential internal slots

Related: w3c-fedid/digital-credentials#508 (removing the "origin bound" declaration from DigitalCredential, which declared it but never used it)


Preview | Diff

Previously, [[origin]] was defined in a floating paragraph outside the
formal interface definition and only existed on subtypes that declared
themselves "origin bound". This moves it into the dfn list alongside
[[type]] and [[discovery]], with a default value of null.

The slot is now universally present on all Credential objects. Subtypes
that are origin bound (PasswordCredential, FederatedCredential) set it
to the caller's origin at creation time. Subtypes that are not origin
bound (e.g., PublicKeyCredential) leave it as null.

Closes #295

Copilot AI left a comment

Copy link
Copy Markdown

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 Credential Management spec text to formalize [[origin]] as a Credential internal slot in the dfn list (alongside [[type]] and [[discovery]]), and refines the definition of “origin bound” in terms of [[origin]] being non-null.

Changes:

  • Adds Credential/[[origin]] to the Credential dfn list and defines “origin bound” via non-null [[origin]].
  • Updates PasswordCredential and FederatedCredential prose to describe [[origin]] being set at creation time.
  • Minor formatting/indentation adjustments in an algorithm list.

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

Comment thread index.bs
Comment on lines +503 to +506
:: The {{Credential}} [=interface object=] has an internal slot named `[[origin]]`,
which stores the [=origin=] for which the {{Credential}} may be [=effective=], or
null if the credential is not [=Credential/origin bound=]. Its value is null unless
otherwise specified by a subtype.
Comment thread index.bs

{{PasswordCredential}} objects are [=Credential/origin bound=].
{{PasswordCredential}} objects are [=Credential/origin bound=]: their {{Credential/[[origin]]}}
slot is set to the caller's [=origin=] at creation time.
Comment thread index.bs

{{FederatedCredential}} objects are [=Credential/origin bound=].
{{FederatedCredential}} objects are [=Credential/origin bound=]: their {{Credential/[[origin]]}}
slot is set to the caller's [=origin=] at creation time.
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.

Move [[origin]] internal slot for Credential into dfn list

2 participants