You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This patch adds `requestUserInfo` to `PublicKeyCredentialUserEntity`.
This allows a relying party to request user identifiers and attributes
alongside a WebAuthn credential on `create()` to aid with account
creation.
Fixes 2336.
:: This [=internal slot=] contains the [=user information=] requested by the [=[RP]=].
1666
+
If [=user information=] was not requested, contains the value is not present.
1652
1667
</dl>
1653
1668
1654
1669
{{PublicKeyCredential}}'s [=interface object=] inherits {{Credential}}'s implementation of
@@ -1748,12 +1763,14 @@ When this method is invoked, the user agent MUST execute the following algorithm
1748
1763
1749
1764
1. Throw a "{{NotAllowedError}}" {{DOMException}}.
1750
1765
1751
-
1. [=Consume user activation=] of the [=relevant global object=].
1752
-
1753
1766
1. If the [=origin=] that is creating a credential is different from the [=top-level origin=] of the [=relevant global object=]
1754
1767
(i.e., is a different origin than the user can see in the address bar),
1755
1768
the [=client=] SHOULD make this fact clear to the user.
1756
1769
1770
+
1. If <var ignore>sameOriginWithAncestors</var> is [FALSE]
1771
+
or <code>|options|.{{PublicKeyCredentialCreationOptions/user}}.{{PublicKeyCredentialUserEntity/requestUserInfo}}</code> is present,
1772
+
[=consume user activation=] of the [=relevant global object=].
1773
+
1757
1774
1. Let |pkOptions| be the value of <code>|options|.{{CredentialCreationOptions/publicKey}}</code>.
1758
1775
1759
1776
1. If <code>|pkOptions|.{{PublicKeyCredentialCreationOptions/timeout}}</code> is present, check if its value lies within a
@@ -1897,6 +1914,24 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
1897
1914
been completed. That authentication ceremony MAY be performed via other means than the
1898
1915
[=Web Authentication API=].
1899
1916
1917
+
1. If <code>|options|.{{PublicKeyCredentialCreationOptions/user}}.{{PublicKeyCredentialUserEntity/requestUserInfo}}</code>
1918
+
is present:
1919
+
1920
+
1. Prompt the user for the requested [=user information=] in such a way that the user selects a single [=user information/identifier type=]
1921
+
and its value, and fills in all requested [=user information/attributes=].
1922
+
1. Let |userInfo| be a {{PublicKeyCredentialUserInfo}} dictionary.
1923
+
1. Set <code>|userInfo|.{{PublicKeyCredentialUserInfo/identifier}}.{{PublicKeyCredentialUserInfoIdentifier/type}}</code>
1924
+
to the [=user information/identifier type=] selected by the user.
1925
+
1. Set <code>|userInfo|.{{PublicKeyCredentialUserInfo/identifier}}.{{PublicKeyCredentialUserInfoIdentifier/value}}</code>
1926
+
to the [=user information/identifier=] filled by the user.
1927
+
1. For every [=user information/attribute type=] |attribute| in <code>|options|.{{PublicKeyCredentialCreationOptions/user}}.{{PublicKeyCredentialUserEntity/requestUserInfo}}.{{PublicKeyCredentialRequestUserInfo/attributes}}</code>
1928
+
that is understood by the user agent:
1929
+
1. Set <code>|userInfo|.{{PublicKeyCredentialUserInfo/attributes}}[|attribute|].{{Localizable/value}}</code>
1930
+
to the [=user information/attribute=] filled by the user.
1931
+
1. Set <code>|userInfo|.{{PublicKeyCredentialUserInfo/attributes}}[|attribute|].{{Localizable/language}}</code>
1932
+
and <code>|userInfo|.{{PublicKeyCredentialUserInfo/attributes}}[|attribute|].{{Localizable/dir}}</code>
1933
+
according to the user agent language settings or other relevant information.
1934
+
1900
1935
1. Consider the value of {{PublicKeyCredentialCreationOptions/hints}} and craft the user interface accordingly, as the user-agent sees fit.
1901
1936
1902
1937
1. Start |lifetimeTimer|.
@@ -2171,6 +2206,9 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
2171
2206
:: A new {{ArrayBuffer}}, created using |global|'s [=%ArrayBuffer%=], containing the bytes of
@@ -3839,6 +3881,107 @@ Note: The {{AttestationConveyancePreference}} enumeration is deliberately not re
3839
3881
If permitted, the user agent SHOULD signal to the authenticator (at [invocation time](#CreateCred-InvokeAuthnrMakeCred)) that enterprise attestation is requested, and convey the resulting [=/AAGUID=] and [=attestation statement=], unaltered, to the [=[RP]=].
3840
3882
</div>
3841
3883
3884
+
### Request User Information ### {#dictionary-requestUserInfo}
3885
+
3886
+
[=[WRPS]=] may use the {{PublicKeyCredentialRequestUserInfo}} dictionary to request [=user information=]
3887
+
to be returned as part of the {{CredentialsContainer/create()}} request.
3888
+
3889
+
<dfn>User information</dfn> that may be requested consists of:
3890
+
3891
+
<dl dfn-type="dfn" dfn-for="user information">
3892
+
: <dfn>Identifier</dfn>
3893
+
:: A single string that can be used to uniquely identify a [=user account=],
3894
+
and whose value will be used as the credential's {{PublicKeyCredentialEntity/name}}
3895
+
and {{PublicKeyCredentialUserEntity/displayName}}.
0 commit comments