-
Notifications
You must be signed in to change notification settings - Fork 31
Add 'DigitalCredentialProtocol' typedef #452
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Introduces a new WebIDL typedef intended to represent digital credential protocol identifiers and wires it into the DigitalCredential interface.
Changes:
- Added
DigitalCredentialsProtocoltypedef. - Updated
DigitalCredential.protocolfromDOMStringtoDigitalCredentialsProtocol. - Updated
userAgentAllowsProtocol()’s validation step to referenceDigitalCredentialsProtocol.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| typedef DigitalCredentialPresentationProtocol DigitalCredentialsProtocol; | ||
|
|
||
| [Exposed=Window, SecureContext] | ||
| interface DigitalCredential : Credential { | ||
| [Default] object toJSON(); | ||
| readonly attribute DOMString protocol; | ||
| readonly attribute DigitalCredentialsProtocol protocol; |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
DigitalCredentialsProtocol is currently just a typedef alias of DigitalCredentialPresentationProtocol, but the surrounding prose (and issue #441) indicates it should cover both presentation and issuance protocols. As written, DigitalCredential.protocol cannot represent an issuance protocol value. Consider defining a DigitalCredentialIssuanceProtocol enum and making DigitalCredentialsProtocol a union of the two enums (or keep protocol as DOMString until the issuance enum exists).
| <li>If |protocol| is not a member of | ||
| {{DigitalCredentialPresentationProtocol}}, return `false`. | ||
| <li>If |protocol| is not an [=enumeration value=] of | ||
| {{DigitalCredentialsProtocol}}, return `false`. |
Copilot
AI
Feb 3, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
userAgentAllowsProtocol() is described as supporting both presentation and issuance protocols, but the updated check only validates against DigitalCredentialsProtocol, which currently aliases the presentation enum. This will cause the algorithm to return false for any issuance protocol identifiers. Once issuance protocols are modeled (e.g., via a dedicated enum), update this validation step to accept both sets of identifiers.
| {{DigitalCredentialsProtocol}}, return `false`. | |
| {{DigitalCredentialPresentationProtocol}} or | |
| {{DigitalCredentialIssuanceProtocol}}, return `false`. |
Closes #441
The
DigitalCredentialProtocolwill eventually hold both Issuance and Presentation protocols.Related: #453
The following tasks have been completed:
Modified Web platform tests- not testable.Implementation commitment:
Documentation and checks
Preview | Diff