Skip to content
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

Add "webauthn" autocomplete token #8006

Merged
merged 6 commits into from
Jun 16, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
79 changes: 77 additions & 2 deletions source
Original file line number Diff line number Diff line change
Expand Up @@ -4310,6 +4310,7 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<ul class="brief">
<li><dfn data-x-href="https://wicg.github.io/uuid/#dfn-generate-a-random-uuid">generating a random UUID</dfn></li>
</ul>
</dd>

<dt>WebSockets</dt>

Expand All @@ -4320,6 +4321,29 @@ a.setAttribute('href', 'https://example.com/'); // change the content attribute
<li><dfn data-x-href="https://websockets.spec.whatwg.org/#websocket"><code>WebSocket</code></dfn></li>
<li><dfn data-x-href="https://websockets.spec.whatwg.org/#make-disappear" for="WebSocket">make disappear</dfn></li>
</ul>
</dd>
domenic marked this conversation as resolved.
Show resolved Hide resolved

domenic marked this conversation as resolved.
Show resolved Hide resolved
<dt>Web Authentication: An API for accessing Public Key Credentials</dt>

<dd>
<p>The following terms are defined in <cite>Web Authentication: An API for accessing Public Key Credentials</cite>: <ref spec=WEBAUTHN></p>

<ul class="brief">
<li><dfn data-x-href="https://w3c.github.io/webauthn/#public-key-credential">public key credential</dfn></li>
</ul>
</dd>

<dt>Credential Management</dt>

domenic marked this conversation as resolved.
Show resolved Hide resolved
<dd>
domenic marked this conversation as resolved.
Show resolved Hide resolved
<p>The following terms are defined in <cite>Credential Management</cite>: <ref spec=CREDMAN></p>

<ul class="brief">
<li><dfn data-x-href="https://w3c.github.io/webappsec-credential-management/#dom-credentialmediationrequirement-conditional">conditional mediation</dfn></li>
<li><dfn data-x="credman-credential" data-x-href="https://w3c.github.io/webappsec-credential-management/#credential">credential</dfn></li>
<li><dfn data-x-href="https://w3c.github.io/webappsec-credential-management/#dom-credentialscontainer-get"><code>navigator.credentials.get()</code></dfn></li>
</ul>
</dd>
</dl>

<hr>
Expand Down Expand Up @@ -55745,6 +55769,13 @@ form.method === input; // => true</code></pre>

</ul>
</li>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<li><p>Optionally, a token that is an <span>ASCII case-insensitive</span> match for the string
"<dfn data-x="attr-fe-autocomplete-webauthn"><code>webauthn</code></dfn>", meaning the user agent
should show <span data-x="public key credential">public key credentials</span> available via
<code data-x="conditional mediation">conditional</code> mediation when the user interacts with the
form control. <code data-x="attr-fe-autocomplete-webauthn">webauthn</code> is only valid for
<code>input</code> and <code>textarea</code> elements.</p></li>
</ol>

<p>As noted earlier, the meaning of the attribute and its keywords depends on the mantle that the
Expand Down Expand Up @@ -56403,8 +56434,8 @@ MIT Room 32-G524
<h6 id="autofill-processing-model"><span id="processing-model-3"></span>Processing model</h6>

domenic marked this conversation as resolved.
Show resolved Hide resolved
<p>Each <code>input</code> element to which the <code data-x="attr-fe-autocomplete">autocomplete</code> attribute <span data-x="concept-input-apply">applies</span>, each <code>select</code> element, and each <code>textarea</code> element, has an
domenic marked this conversation as resolved.
Show resolved Hide resolved
<dfn>autofill hint set</dfn>, an <dfn>autofill scope</dfn>, an <dfn>autofill field name</dfn>, and
an <dfn>IDL-exposed autofill value</dfn>.</p>
<dfn>autofill hint set</dfn>, an <dfn>autofill scope</dfn>, an <dfn>autofill field name</dfn>, a
<dfn>non-autofill credential type</dfn>, and an <dfn>IDL-exposed autofill value</dfn>.</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

<p>The <span>autofill field name</span> specifies the specific kind of data expected in the field,
e.g. "<code data-x="attr-fe-autocomplete-street-address">street-address</code>" or "<code
Expand All @@ -56415,6 +56446,21 @@ MIT Room 32-G524
data-x="attr-fe-autocomplete-fax">fax</code>" or "<code
data-x="attr-fe-autocomplete-billing">billing</code>".</p>

<p>The <span>non-autofill credential type</span> identifies a type of
domenic marked this conversation as resolved.
Show resolved Hide resolved
domenic marked this conversation as resolved.
Show resolved Hide resolved
<span data-x="credman-credential">credential</span> that may be offered by the user agent when the
domenic marked this conversation as resolved.
Show resolved Hide resolved
user interacts with the field alongside other <span>autofill field</span> values. If this value is
"<code data-x="">webauthn</code>" instead of null, selecting a credential of that type will resolve
a pending <code data-x="conditional mediation">conditional</code> mediation
<code>navigator.credentials.get()</code> request, instead of autofilling the field.</p>
domenic marked this conversation as resolved.
Show resolved Hide resolved

domenic marked this conversation as resolved.
Show resolved Hide resolved
<div class="example">
domenic marked this conversation as resolved.
Show resolved Hide resolved
<p>For example, a sign-in page could instruct the user agent to either autofill a saved password,
or show a <span>public key credential</span> that will resolve a pending
<code>navigator.credentials.get()</code> request. A user can select either to sign-in.</p>

<pre><code class="html">&lt;input name=password type=password autocomplete="password webauthn"></code></pre>
</div>

<p>The <span>autofill scope</span> identifies the group of fields whose information concerns the
same subject, and consists of the <span>autofill hint set</span> with, if
applicable, the "<code data-x="">section-*</code>" prefix, e.g. "<code data-x="">billing</code>",
Expand Down Expand Up @@ -56677,6 +56723,11 @@ MIT Room 32-G524
<td>"<code data-x="attr-fe-autocomplete-impp">impp</code>"
<td>4
<td>Contact
<tbody>
<tr>
<td>"<code data-x="attr-fe-autocomplete-webauthn">webauthn</code>"
<td>5
<td>Credential
</table>
</li>

Expand All @@ -56698,8 +56749,22 @@ MIT Room 32-G524

<li><p>Let <var>hint tokens</var> be an empty set.</p></li>

<li><p>Let <var>credential type</var> be null.</p></li>

<li><p>Let <var>IDL value</var> have the same value as <var>field</var>.</p></li>

<li>
<p>If <var>category</var> is Credential and the <var>index</var>th token in <var>tokens</var> is
an <span>ASCII case-insensitive</span> match for "<code
domenic marked this conversation as resolved.
Show resolved Hide resolved
data-x="attr-fe-autocomplete-webauthn">webauthn</code>", then run the substeps that follow:</p>
<ol>
domenic marked this conversation as resolved.
Show resolved Hide resolved
domenic marked this conversation as resolved.
Show resolved Hide resolved
<li><p>Set <var>credential type</var> to "<code data-x="">webauthn</code>".</p></li>
<li><p>If the <var>index</var>th token in <var>tokens</var> is the first entry,
then skip to the step labeled <i>done</i>.</p></li>
<li><p>Decrement <var>index</var> by one.</p></li>
</ol>
</li>

<li><p>If the <var>index</var>th token in <var>tokens</var> is the first entry,
then skip to the step labeled <i>done</i>.</p></li>

Expand Down Expand Up @@ -56788,6 +56853,9 @@ MIT Room 32-G524
<li><p><i>Done</i>: Let the element's <span>autofill hint set</span> be <var>hint
tokens</var>.</p>

<li><p>Let the element's <span>non-autofill credential type</span> be <var>credential
type</var>.</p></li>

<li><p>Let the element's <span>autofill scope</span> be <var>scope tokens</var>.</p>

<li><p>Let the element's <span>autofill field name</span> be <var>field</var>.</p>
Expand Down Expand Up @@ -128046,6 +128114,9 @@ INSERT INTERFACES HERE
<dt id="refsCOOKIES">[COOKIES]</dt>
<dd><cite><a href="https://httpwg.org/specs/rfc6265.html">HTTP State Management Mechanism</a></cite>, A. Barth. IETF.</dd>

<dt id="refsCREDMAN">[CREDMAN]</dt>
<dd><cite><a href="https://w3c.github.io/webappsec-credential-management/">Credential Management</a></cite>, N. Satragno, J. Hodges, M. West. W3C.</dd>

<dt id="refsCSP">[CSP]</dt>
<dd><cite><a href="https://w3c.github.io/webappsec-csp/">Content Security Policy</a></cite>, M. West, D. Veditz. W3C.</dd>

Expand Down Expand Up @@ -128541,6 +128612,9 @@ INSERT INTERFACES HERE
<dt id="refsWEBAUDIO">[WEBAUDIO]</dt>
<dd>(Non-normative) <cite><a href="https://webaudio.github.io/web-audio-api/">Web Audio API</a></cite>, P. Adenot, H. Choi. W3C.</dd>

<dt id="refsWEBAUTHN">[WEBAUTHN]</dt>
<dd><cite><a href="https://w3c.github.io/webauthn">Web Authentication: An API for accessing Public Key Credentials</a></cite>, M. Jones, A. Kumar, E. Lundberg, D. Balfanz, V. Bharadwaj, A. Birgisson, A. Czeskis, J. Hodges, J.C. Jones, H. Le Van Gong, A. Liao, R. Lindemann, J. Bradley, C. Brand, T. Cappalli, A. Langley, G. Mandyam, M. Miller, N. Satragno, N. Steele, J. Tan, S. Weeden, M. West, J. Yasskin. W3C.</dd>

<dt id="refsWEBCODECS">[WEBCODECS]</dt>
<dd><cite><a href="https://w3c.github.io/webcodecs/">WebCodecs API</a></cite>, C. Cunningham, P. Adenot, B. Aboba. W3C.</dd>

Expand Down Expand Up @@ -129376,6 +129450,7 @@ INSERT INTERFACES HERE
Nicolas Pena Moreno,
Nikki Bee,
Niklas Gögge,
Nina Satragno,
Noah Mendelsohn,
Noah Slater,
Noam Rosenthal,
Expand Down