Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Commit the editorial suggestions

Co-Authored-By: =JeffH <jdhodges@google.com>
  • Loading branch information
nsatragno and equalsJeffH committed Jul 8, 2019
1 parent f908922 commit a5062cd
Showing 1 changed file with 15 additions and 16 deletions.
31 changes: 15 additions & 16 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -234,6 +234,7 @@ spec: webdriver; urlPrefix: https://w3c.github.io/webdriver/webdriver-spec.html#
text: WebDriver error code; url: dfn-error-code
text: extension command; url: dfn-extension-command
text: extension command name; url: dfn-extension-command-name
text: getting a property; url: dfn-getting-properties
text: prefix; url: dfn-url-prefix
text: invalid argument; url: dfn-invalid-argument
text: local end; url: dfn-local-end
Expand Down Expand Up @@ -5497,29 +5498,27 @@ At this time, one [=credential property=] is defined: the [=resident key credent
:: None.


# Automation # {#sctn-automation}
# User Agent Automation # {#sctn-automation}

For the purposes of user-agent automation and application testing, this document defines a number of [=extension
commands=] for the [[WebDriver]] specification.
For the purposes of user agent automation and [=web application=] testing, this document defines a number of [[WebDriver]] [=extension commands=].

## <dfn>Virtual Authenticators</dfn> ## {#sctn-automation-virtual-authenticators}

These [=extension commands=] create and interact with [=Virtual Authenticators=]: software implementations of the
<a>Authenticator Model</a>. <a>Virtual Authenticators</a> are stored in a <dfn>Virtual Authenticator Database</dfn> and
These WebDriver [=extension commands=] create and interact with [=Virtual Authenticators=]: software implementations of the
<a>Authenticator Model</a>. <a>Virtual Authenticators</a> are stored in a <dfn>Virtual Authenticator Database</dfn>.
have the following properties:

: |authenticatorId|
:: An arbitrary non-null string that uniquely identifies the [=Virtual Authenticator=].
: |protocol|
:: The protocol the [=Virtual Authenticator=] uses to encode its messages. Either `ctap2` for the [[FIDO-CTAP]] format
or `u2f` for the [[FIDO-U2F-Message-Formats]].
: |transport|
:: The {{AuthenticatorTransport}} simulated. If the |transport| is set to {{AuthenticatorTransport/internal}}, the
authenticator simulates [=platform attachment=]. Otherwise, it simulates [=cross-platform attachment=].
: |hasResidentKey|
:: If set to `true`, the authenticator will support [=resident credentials=].
:: If set to [TRUE] the authenticator will support [=resident credentials=].
: |hasUserVerification|
:: If set to `true`, the authenticator will support [=user verification=].
:: If set to [TRUE], the authenticator supports [=user verification=].
: |isUserVerified|
:: Determines the result of [=User Verification=] performed on the [=Virtual Authenticator=]. If set to `true`,
[=User Verification=] will always succeed. If set to `false`, it will fail. This property has no effect if
Expand All @@ -5528,7 +5527,7 @@ have the following properties:
## <dfn>Add Virtual Authenticator</dfn> ## {#sctn-automation-add-virtual-authenticator}

The [=Add Virtual Authenticator=] [=extension command=] creates a software [=Virtual Authenticator=]. The
[=extension command=] is defined as follows:
WebDriver [=extension command=] is defined as follows:

<xmp class="idl">
enum AuthenticatorProtocol {
Expand Down Expand Up @@ -5576,11 +5575,11 @@ The [=remote end steps=] are:
1. Create a new [=Virtual Authenticator=] with the fields |authenticatorId|, |protocol|, |transport|,
|hasResidentKey|, |hasUserVerification|, and |isUserVerified|.
1. Store the authenticator in the [=Virtual Authenticator Database=].
1. Return [=success=] with |authenticatorId|.
1. Return [=success=] with data |authenticatorId|.

## <dfn>Remove Virtual Authenticator</dfn> ## {#sctn-automation-remove-virtual-authenticator}

The [=Remove Virtual Authenticator=] [=extension command=] removes a previously created [=Virtual Authenticator=].
The [=Remove Virtual Authenticator=] WebDriver [=extension command=] removes a previously created [=Virtual Authenticator=].
The [=extension command=] is defined as follows:

<figure id="table-removeVirtualAuthenticator" class="table">
Expand Down Expand Up @@ -5609,7 +5608,7 @@ The [=remote end steps=] are:

## <dfn>Add Credential</dfn> ## {#sctn-automation-add-credential}

The [=Add Credential=] [=extension command=] injects a [=Credential Key Pair=] and associated [=Authenticator Data=]
The [=Add Credential=] WebDriver [=extension command=] injects a [=Credential Key Pair=] and associated [=Authenticator Data=]
into an existing [=Virtual Authenticator=]. The [=extension command=] is defined as follows:

<xmp class="idl">
Expand Down Expand Up @@ -5655,7 +5654,7 @@ The [=remote end steps=] are:
1. If |privateKey| is failure, return a [=WebDriver error=] with [=WebDriver error code=] [=invalid argument=].
1. If |authenticatorId| does not match any [=Virtual Authenticator=] stored in the [=Virtual Authenticator
Database=], return a [=WebDriver error=] with [=WebDriver error code=] [=invalid argument=].
1. If |privateKey| is not a valid PKCS #8 encoded private key [[RFC5958]], return a [=WebDriver error=] with
1. If |privateKey| is not a validly-encoded asymmetric key package containing a single private key per [[RFC5958]], return a [=WebDriver error=] with
[=WebDriver error code=] [=invalid argument=].
1. Create a [=Credential Key Pair=] from |privateKey| identified by |credentialId| and an [=Authenticator Data=]
structure from |rpIdHash| and |signCount|, and store them in the database of the [=Virtual Authenticator=]
Expand All @@ -5664,7 +5663,7 @@ The [=remote end steps=] are:

## <dfn>Get Credentials</dfn> ## {#sctn-automation-get-credentials}

The [=Get Credentials=] [=extension command=] returns one {{CredentialParams}} for every [=Credential Key Pair=]
The [=Get Credentials=] WebDriver [=extension command=] returns one {{CredentialParams}} for every [=Credential Key Pair=]
and associated [=Authenticator Data=] stored in a [=Virtual Authenticator=], regardless of whether they were
stored using [=Add Credential=] or {{CredentialsContainer/create()|navigator.credentials.create()}}. The [=extension command=]
is defined as follows:
Expand All @@ -5691,11 +5690,11 @@ The [=remote end steps=] are:
1. If |authenticatorId| does not match any [=Virtual Authenticator=] stored in the [=Virtual Authenticator
Database=], return a [=WebDriver error=] with [=WebDriver error code=] [=invalid argument=].
1. For every [=Credential Key Pair=], construct a corresponding {{CredentialParams}}.
1. Return [=success=] with the array of {{CredentialParams}}.
1. Return [=success=] with data containing |credentialsArray|.

## <dfn>Remove Credentials</dfn> ## {#sctn-automation-remove-credentials}

The [=Remove Credentials=] [=extension command=] removes all [=Credential Key Pairs=] stored on a [=Virtual Authenticator=].
The [=Remove Credentials=] WebDriver [=extension command=] removes all [=Credential Key Pairs=] stored on a [=Virtual Authenticator=].
The [=extension command=] is defined as follows:

<figure id="table-removeCredentials" class="table">
Expand Down

0 comments on commit a5062cd

Please sign in to comment.