Skip to content

Digital Credentials: implement userAgentAllowsProtocol() #47283

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

Conversation

marcoscaceres
Copy link
Contributor

@marcoscaceres marcoscaceres commented Jun 27, 2025

13d1709

Digital Credentials: implement userAgentAllowsProtocol()
rdar://153776127
https://bugs.webkit.org/show_bug.cgi?id=294352

Reviewed by Anne van Kesteren.

This implements the userAgentAllowsProtocol() method, which allows
user agents to indicate whether they support a given protocol for
digital credentials. This is useful for sites to determine if they can
request a digital credential with a specific protocol.

Spec:
https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol

WebKit only supports the "org-iso-mdoc" protocol, so this method
returns true only for that protocol.

Imports relevent Web Platform Tests. Upstream commit:

web-platform-tests/wpt@c7fd2ce
Canonical link: https://commits.webkit.org/296786@main

ed3f83f

Misc iOS, visionOS, tvOS & watchOS macOS Linux Windows
✅ 🧪 style ✅ 🛠 ios ✅ 🛠 mac ✅ 🛠 wpe ✅ 🛠 win
✅ 🧪 bindings ✅ 🛠 ios-sim ✅ 🛠 mac-AS-debug ✅ 🧪 wpe-wk2 ⏳ 🧪 win-tests
✅ 🧪 webkitperl ✅ 🧪 ios-wk2 ✅ 🧪 api-mac ✅ 🧪 api-wpe
✅ 🧪 ios-wk2-wpt ✅ 🧪 mac-wk1 ✅ 🛠 wpe-cairo
✅ 🧪 api-ios ✅ 🧪 mac-wk2 ✅ 🛠 gtk
✅ 🛠 vision ✅ 🧪 mac-AS-debug-wk2 ✅ 🧪 gtk-wk2
✅ 🛠 vision-sim ✅ 🧪 mac-wk2-stress ✅ 🧪 api-gtk
✅ 🛠 🧪 merge ✅ 🧪 vision-wk2 ✅ 🧪 mac-intel-wk2 ✅ 🛠 playstation
✅ 🛠 tv ✅ 🛠 mac-safer-cpp
✅ 🛠 tv-sim
✅ 🛠 watch
✅ 🛠 watch-sim

@marcoscaceres marcoscaceres self-assigned this Jun 27, 2025
@marcoscaceres marcoscaceres force-pushed the eng/Digital-Credentials-implement-userAgentAllowsProtocol branch from 4fe3b55 to ed3f83f Compare June 27, 2025 08:32
@@ -31,4 +31,5 @@
] interface DigitalCredential : BasicCredential {
[SameObject] readonly attribute object data;
readonly attribute IdentityCredentialProtocol protocol;
static boolean userAgentAllowsProtocol(DOMString protocol);
Copy link
Contributor

Choose a reason for hiding this comment

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

I usually put static members first.

@marcoscaceres marcoscaceres added the merge-queue Applied to send a pull request to merge-queue label Jun 30, 2025
rdar://153776127
https://bugs.webkit.org/show_bug.cgi?id=294352

Reviewed by Anne van Kesteren.

This implements the userAgentAllowsProtocol() method, which allows
user agents to indicate whether they support a given protocol for
digital credentials. This is useful for sites to determine if they can
request a digital credential with a specific protocol.

Spec:
https://w3c-fedid.github.io/digital-credentials/#dom-digitalcredential-useragentallowsprotocol

WebKit only supports the "org-iso-mdoc" protocol, so this method
returns true only for that protocol.

Imports relevent Web Platform Tests. Upstream commit:

web-platform-tests/wpt@c7fd2ce
Canonical link: https://commits.webkit.org/296786@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/Digital-Credentials-implement-userAgentAllowsProtocol branch from ed3f83f to 13d1709 Compare June 30, 2025 03:18
@webkit-commit-queue
Copy link
Collaborator

Committed 296786@main (13d1709): https://commits.webkit.org/296786@main

Reviewed commits have been landed. Closing PR #47283 and removing active labels.

@webkit-commit-queue webkit-commit-queue merged commit 13d1709 into WebKit:main Jun 30, 2025
@webkit-commit-queue webkit-commit-queue removed the merge-queue Applied to send a pull request to merge-queue label Jun 30, 2025
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.

4 participants