Skip to content

Commit 50c962a

Browse files
authored
Add userAgentAllowsProtocol static method (#221)
1 parent c5ac0ef commit 50c962a

File tree

1 file changed

+39
-0
lines changed

1 file changed

+39
-0
lines changed

index.html

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -462,6 +462,7 @@ <h2>
462462
interface DigitalCredential : Credential {
463463
readonly attribute DOMString protocol;
464464
[SameObject] readonly attribute object data;
465+
static boolean userAgentAllowsProtocol(DOMString protocol);
465466
};
466467
</pre>
467468
<p>
@@ -488,6 +489,44 @@ <h2>
488489
Integration with Credential Management API
489490
</h2>
490491
<aside class="issue" data-number="65"></aside>
492+
<h3>
493+
The <dfn data-dfn-for="DigitalCredential">userAgentAllowsProtocol()</dfn>
494+
method
495+
</h3>
496+
<p>
497+
The {{DigitalCredential/userAgentAllowsProtocol()}} method allows digital
498+
credential [=verifiers=] to determine which [=digital credential/exchange
499+
protocols=] and [=digital credential/issuance protocols=] the user agent
500+
allows.
501+
</p>
502+
<p class="note">
503+
This method does not convey [=digital credential/exchange protocol=] or
504+
[=digital credential/issuance protocol=] support in the underlying
505+
OS/platform.
506+
</p>
507+
<p>
508+
User agents MUST NOT vary the response value based on any information
509+
about availability of hardware, presence or configuration of software,
510+
wallets, credential providers, or digital credentials, or user
511+
configuration or preferences. If the response value varied, the user
512+
agent would introduce risks both of fingerprinting and of silently
513+
revealing other details about user behavior or configuration. The
514+
response value SHOULD vary only by user agent major version and indicate
515+
whether the browser supports distributing requests with that protocol to
516+
underlying platform or provider.
517+
</p>
518+
<p>
519+
When this method is invoked, the user agent MUST execute the following
520+
algorithm:
521+
</p>
522+
<ol class="algorithm">
523+
<li>If |protocol| is not a [=digital credential/protocol identifier=],
524+
return `false`.
525+
</li>
526+
<li>Return `true` if the user agent allows |protocol|, otherwise return
527+
`false`.
528+
</li>
529+
</ol>
491530
<h3>
492531
[[\DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)
493532
internal method

0 commit comments

Comments
 (0)