From 146a63e8943020aad56ddbd32f77d03f5cbd69e4 Mon Sep 17 00:00:00 2001 From: Nina Satragno Date: Wed, 18 Sep 2024 12:16:36 -0400 Subject: [PATCH] Add userName and userDisplayName to webdriver 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 --- index.bs | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/index.bs b/index.bs index 0db3e9d0a..89ea812ba 100644 --- a/index.bs +++ b/index.bs @@ -8013,6 +8013,22 @@ The Credential Parameters is a JSON [=Object=] passed to the [=remote boolean + + |userName| + + The {{PublicKeyCredentialUserEntity|user}}'s {{PublicKeyCredentialEntity/name}} associated to the credential. + If unset, the value will default to the empty string. + + string + + + |userDisplayName| + + The {{PublicKeyCredentialUserEntity|user}}'s {{PublicKeyCredentialUserEntity/displayName}} associated to the credential. + If unset, the value will default to the empty string. + + string + @@ -8053,6 +8069,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=] @@ -8065,6 +8085,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|'