Skip to content

Commit

Permalink
Add userName and userDisplayName to webdriver
Browse files Browse the repository at this point in the history
This PR adds the userName and userDisplayName properties to the
webdriver's credential parameters. These properties are useful to test
the new signalCurrentUserDetails method, both on WPTs and for web
developers.

Closes #2143
  • Loading branch information
nsatragno committed Sep 18, 2024
1 parent 403c2b3 commit 5c2e0bc
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -8011,6 +8011,22 @@ The <dfn>Credential Parameters</dfn> is a JSON [=Object=] passed to the [=remote
</td>
<td>boolean</td>
</tr>
<tr>
<td>|userName|</td>
<td>
The {{PublicKeyCredentialUserEntity|user}}'s {{PublicKeyCredentialEntity/name}} associated to the credential.
If unset, the value will default to the empty string.
</td>
<td>string</td>
</tr>
<tr>
<td>|userDisplayName|</td>
<td>
The {{PublicKeyCredentialUserEntity|user}}'s {{PublicKeyCredentialUserEntity/displayName}} associated to the credential.
If unset, the value will default to the empty string.
</td>
<td>string</td>
</tr>
</tbody>
</table>
</figure>
Expand Down Expand Up @@ -8051,6 +8067,10 @@ The [=remote end steps=] are:
1. If |backupEligibility| is not defined, set |backupEligibility| to the value of the |authenticator|'s |defaultBackupEligibility|.
1. Let |backupState| be the |parameters|' |backupState| property.
1. If |backupState| is not defined, set |backupState| to the value of the |authenticator|'s |defaultBackupState|.
1. Let |userName| be the |parameters|' |userName| property.
1. If |userName| is not defined, set |userName| to the empty string.
1. Let |userDisplayName| be the |parameters|' |userDisplayName| property.
1. If |userDisplayName| is not defined, set |userDisplayName| to the empty string.
1. Let |credential| be a new [=Client-side discoverable Public Key Credential Source=] if |isResidentCredential| is [TRUE]
or a [=Server-side Public Key Credential Source=] otherwise whose items are:
: [=public key credential source/type=]
Expand All @@ -8063,6 +8083,8 @@ The [=remote end steps=] are:
:: |rpId|
: [=public key credential source/userHandle=]
:: |userHandle|
: [=public key credential source/otherUI=]
:: Construct from |userName| and |userDisplayName|.
1. Set the |credential|'s [=backup eligibility=] [=credential property=] to |backupEligibility|.
1. Set the |credential|'s [=backup state=] [=credential property=] to |backupState|.
1. Associate a [=signature counter=] |counter| to the |credential| with a starting value equal to the |parameters|'
Expand Down

0 comments on commit 5c2e0bc

Please sign in to comment.