Skip to content

Commit

Permalink
Address more comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
nsatragno committed Dec 15, 2021
1 parent 1e93cbf commit 7fdbff0
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions index.bs
Expand Up @@ -1124,8 +1124,8 @@ The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL NOT", "SHOULD", "S

: <dfn>otherUI</dfn>
:: OPTIONAL other information used by the [=authenticator=] to inform its UI. For example, this might include the user's
{{displayName}}. [=otherUI=] is a <dfn>mutable item</dfn> and SHOULD NOT be bound to the [=public key credential source=]
in a way that prevents [=otherUI=] from being updated.
{{displayName}}. [=public key credential source/otherUI=] is a <dfn>mutable item</dfn> and SHOULD NOT be bound to the
[=public key credential source=] in a way that prevents [=public key credential source/otherUI=] from being updated.
</dl>

The [=authenticatorMakeCredential=] operation creates a [=public key credential source=] [=bound credential|bound=] to a <dfn for="public key
Expand Down Expand Up @@ -1973,7 +1973,7 @@ see [[dom#abortcontroller-api-integration]] for detailed instructions.

This algorithm accepts two arguments:

<dl dfn-type="argument" dfn-for="Issuing a request to an authenticator">
<dl dfn-type="argument" dfn-for="Issuing a credential request to an authenticator">
: <dfn>authenticator</dfn>
:: A [=client platform=]-specific handle identifying an [=authenticator=] presently available on this [=client platform=].

Expand All @@ -1983,7 +1983,7 @@ This algorithm accepts two arguments:
object specifying the desired attributes of the [=public key credential=] to discover.
</dl>

The steps for [=issuing a request to an authenticator=] are as follows:
The steps for [=issuing a credential request to an authenticator=] are as follows:

1. If <code>|options|.{{PublicKeyCredentialRequestOptions/userVerification}}</code> is set to
{{UserVerificationRequirement/required}} and the |authenticator| is not capable of performing [=user verification=],
Expand Down Expand Up @@ -2116,6 +2116,10 @@ When this method is invoked, the user agent MUST execute the following algorithm

1. Set a timer |lifetimeTimer| to a value of infinity.

Note: |lifetimeTimer| is set to a value of infinity so that the user can select a credential after interacting
with an [=input=] form control tagged with a `"webauthn"` [=autofill detail token=] for the entire lifetime of
the [=Document=].

1. Else:

1. If the {{PublicKeyCredentialRequestOptions/timeout}} member of |options| is present, check if its value lies
Expand Down Expand Up @@ -2235,6 +2239,9 @@ When this method is invoked, the user agent MUST execute the following algorithm
contains a `"webauthn"` [=autofill detail token=],
:: 1. Prompt the user to optionally select a [=DiscoverableCredentialMetadata=] (|credentialMetadata|) from |silentlyDiscoveredCredentials|.

Note: The prompt shown SHOULD include values from |credentialMetadata|'s [=DiscoverableCredentialMetadata/otherUI=]
such as {{PublicKeyCredentialEntity/name}} and {{PublicKeyCredentialUserEntity/displayName}}.

1. If the user selects a |credentialMetadata|,

1. Let |optionsCopy| be a temporary copy of |options|.
Expand All @@ -2245,7 +2252,7 @@ When this method is invoked, the user agent MUST execute the following algorithm
single {{PublicKeyCredentialDescriptor}} [=list/item=] whose {{PublicKeyCredentialDescriptor/id}}'s value is set to
|credentialMetadata|'s [=DiscoverableCredentialMetadata/id=]'s value.

1. Execute the [=issuing a request to an authenticator=] algorithm with |authenticator| and |optionsCopy|.
1. Execute the [=issuing a credential request to an authenticator=] algorithm with |authenticator| and |optionsCopy|.

1. [=set/Append=] |authenticator| to |issuedRequests|.

Expand Down Expand Up @@ -2276,11 +2283,11 @@ When this method is invoked, the user agent MUST execute the following algorithm

1. [=map/Set=] |silentlyDiscoveredCredentials|[|credentialMetadata|] to |authenticator|.

Note: A request will be issued to this authenticator upon user selection of a [=public key credential source=].
Note: A request will be issued to this authenticator upon user selection of a credential.

1. Else:

1. Execute the [=issuing a request to an authenticator=] algorithm with |authenticator| and |options|.
1. Execute the [=issuing a credential request to an authenticator=] algorithm with |authenticator| and |options|.

1. [=set/Append=] |authenticator| to |issuedRequests|.

Expand Down Expand Up @@ -2987,7 +2994,7 @@ See [[dom#abortcontroller-api-integration]] section for detailed instructions.

The [=visibility states|visibility=] and [=focus=] state of the [=Window=] object determines whether the
{{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)}} and {{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}} operations
should continue. When the [=Window=] object associated with the [[=Document=] loses focus,
should continue. When the [=Window=] object associated with the [=Document=] loses focus,
{{PublicKeyCredential/[[Create]](origin, options, sameOriginWithAncestors)}} and {{PublicKeyCredential/[[DiscoverFromExternalSource]](origin, options, sameOriginWithAncestors)}} operations
SHOULD be aborted.

Expand Down Expand Up @@ -4130,30 +4137,32 @@ When this operation is invoked, the [=authenticator=] MUST perform the following
1. Let |collectedDiscoverableCredentialMetadata| be a new [=list=] whose [=list/items=] are
<dfn>DiscoverableCredentialMetadata</dfn> [=structs=] with the following [=struct/items=]:

<dl dfn-for="DiscoverableCredentialMetadata">
: <dfn>id</dfn>
:: A [=Credential ID=].
<dl dfn-for="DiscoverableCredentialMetadata">
: <dfn>id</dfn>
:: A [=Credential ID=].

: rpId
:: A [=Relying Party Identifier=].
: rpId
:: A [=Relying Party Identifier=].

: userHandle
:: A [=user handle=].
: userHandle
:: A [=user handle=].

: otherUI
:: Other information used by the [=authenticator=] to inform its UI.
</dl>
: <dfn>otherUI</dfn>
:: Other information used by the [=authenticator=] to inform its UI.
</dl>

1. [=map/For each=] [=public key credential source=] |credSource| of |authenticator|'s [=credentials map=]:

1. If |credSource| is not a [=client-side discoverable credential=], [=iteration/continue=].

1. If |credSource|.[=public key credential source/rpId=] is not |rpId|, [=iteration/continue=].

1. Append a new [=DiscoverableCredentialMetadata=] [=struct=] to |collectedDiscoverableCredentialMetadata|
with the |credSource|'s [=public key credential source/id=], [=public key credential source/rpId=],
1. Let |discoveredCredentialMetadata| be a new [=DiscoverableCredentialMetadata] [=struct=] whose [=struct/items=]
are copies of |credSource|'s [=public key credential source/id=], [=public key credential source/rpId=],
[=public key credential source/userHandle=] and [=public key credential source/otherUI=].

1. [=list/Append=] |discoveredCredentialMetadata| to |collectedDiscoverableCredentialMetadata|.

1. Return |collectedDiscoverableCredentialMetadata|.


Expand Down

0 comments on commit 7fdbff0

Please sign in to comment.