Skip to content

Commit cacd06d

Browse files
committed
Initial text for conditional create
1 parent 410d0f7 commit cacd06d

File tree

1 file changed

+67
-5
lines changed

1 file changed

+67
-5
lines changed

index.bs

Lines changed: 67 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1726,8 +1726,14 @@ To support obtaining assertions via {{CredentialsContainer/get()|navigator.crede
17261726
{{PublicKeyCredential}}'s [=interface object=]'s implementation of the <dfn for="PublicKeyCredential" method>\[[Create]](origin,
17271727
options, sameOriginWithAncestors)</dfn> [=internal method=] [[!CREDENTIAL-MANAGEMENT-1]] allows
17281728
[=[WRP]=] scripts to call {{CredentialsContainer/create()|navigator.credentials.create()}} to request the creation of a new
1729-
[=public key credential source=], [=bound credential|bound=] to an [=authenticator=]. This
1730-
{{CredentialsContainer/create()|navigator.credentials.create()}} operation can be aborted by leveraging the {{AbortController}};
1729+
[=public key credential source=], [=bound credential|bound=] to an [=authenticator=].
1730+
1731+
By setting <code>|options|.{{CredentialRequestOptions/mediation}}</code> to {{CredentialMediationRequirement/conditional}},
1732+
[=[RPS]=] can indicate that a prominent modal UI should <i>not</i> be shown <i>unless</i> the user has already consented to create a credential via the [=conditionalCreate|conditionalCreate extension=]). [=[RP]=] script SHOULD first check that [conditionalCreate] is present
1733+
in {=ClientCapabilities=} in order to avoid the possibility of causing a user-visible error to be returned if the user agent does
1734+
not support {{CredentialMediationRequirement/conditional}} [=user mediation=] for {{CredentialsContainer/create()|navigator.credentials.create()}}.
1735+
1736+
This {{CredentialsContainer/create()|navigator.credentials.create()}} operation can be aborted by leveraging the {{AbortController}};
17311737
see [[dom#abortcontroller-api-integration]] for detailed instructions.
17321738

17331739

@@ -1766,6 +1772,11 @@ When this method is invoked, the user agent MUST execute the following algorithm
17661772

17671773
1. If <var ignore>sameOriginWithAncestors</var> is [FALSE]:
17681774

1775+
1. If <code>|options|.{{CredentialRequestOptions/mediation}}</code> is present with the value
1776+
{{CredentialMediationRequirement/conditional}}:
1777+
1778+
1. Throw a "{{NotAllowedError}}" {{DOMException}}
1779+
17691780
1. If the [=relevant global object=], as determined by the calling
17701781
{{CredentialsContainer/create()}} implementation, does not have
17711782
[=transient activation=]:
@@ -1903,6 +1914,13 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
19031914
[=authenticators=] can be <a href="https://en.wikipedia.org/w/index.php?title=Hot_plug">hot-plugged</a> into (e.g., via USB)
19041915
or discovered (e.g., via NFC or Bluetooth) by the [=client=] by various mechanisms, or permanently built into the [=client=].
19051916

1917+
1. If <code>|options|.{{CredentialRequestOptions/mediation}}</code> is present with the value
1918+
{{CredentialMediationRequirement/conditional}}:
1919+
1920+
1. If |conditionalCreateLifetimeTimer| is expired or |conditionalCreateOrigin| is not |callerOrigin|, throw a "{{NotAllowedError}}" {{DOMException}}.
1921+
1922+
1. Set |lifetimeTimer| to a client-specific default.
1923+
19061924
1. Consider the value of {{PublicKeyCredentialCreationOptions/hints}} and craft the user interface accordingly, as the user-agent sees fit.
19071925

19081926
1. Start |lifetimeTimer|.
@@ -2182,7 +2200,6 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
21822200
|authenticator| and [=set/remove=] it from |issuedRequests|.
21832201

21842202
1. Return |constructCredentialAlg| and terminate this algorithm.
2185-
21862203
</dl>
21872204
</li>
21882205

@@ -2191,7 +2208,7 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o
21912208
[[#sctn-make-credential-privacy]] for details.
21922209

21932210
During the above process, the user agent SHOULD show some UI to the user to guide them in the process of selecting and
2194-
authorizing an authenticator.
2211+
authorizing an authenticator. When <code>|options|.{{CredentialRequestOptions/mediation}}</code> is set to {{CredentialMediationRequirement/conditional}}, prominent modal UI should <i>not</i> be shown <i>unless</i> credential creation was previously consented to.
21952212
</div>
21962213

21972214

@@ -4888,7 +4905,6 @@ client ignores any further responses from the authenticator for the canceled ope
48884905
This operation is ignored if it is invoked in an [=authenticator session=] which does not have an [=authenticatorMakeCredential=]
48894906
or [=authenticatorGetAssertion=] operation currently in progress.
48904907

4891-
48924908
### The <dfn>silentCredentialDiscovery</dfn> operation ### {#sctn-op-silent-discovery}
48934909

48944910
This is an OPTIONAL operation authenticators MAY support to enable {{CredentialMediationRequirement/conditional}}
@@ -6714,6 +6730,52 @@ During a transition from the FIDO U2F JavaScript API, a [=[RP]=] may have a popu
67146730
: Authenticator extension output
67156731
:: None.
67166732

6733+
### Conditional Create Extension (<dfn>conditionalCreate</dfn>) ### {#sctn-authenticator-conditional-create-extension}
6734+
6735+
This [=client extension|client=] [=authentication extension=] indicates that the RP would like to create a credential after an authenticaton ceremony is successfully mediated by the user agent.
6736+
6737+
6738+
: Extension identifier
6739+
:: `conditionalCreate`
6740+
6741+
: Operation applicability
6742+
:: [=authentication extension|Authentication=]
6743+
6744+
: Client extension input
6745+
:: The Boolean value [TRUE] to indicate that this extension is requested by the [=[RP]=].
6746+
<xmp class="idl">
6747+
partial dictionary AuthenticationExtensionsClientInputs {
6748+
boolean conditionalCreate;
6749+
};
6750+
</xmp>
6751+
6752+
: Client extension processing
6753+
6754+
:: When [[[#sctn-getAssertion|assertion]]:
6755+
1. Just after [establishing the RP ID](#GetAssertion-DetermineConditional) perform these steps:
6756+
6757+
1. If <code>|options|.{{CredentialRequestOptions/mediation}}</code> is not present or does not have the value
6758+
{{CredentialMediationRequirement/conditional}}:
6759+
6760+
1. Throw a "{{NotAllowedError}}" {{DOMException}}
6761+
6762+
1. When [showing conditional assertion form control](GetAssn-ConditionalMediation-Interact-FormControl):
6763+
6764+
1. Inform the user that the RP will create a credential if the user agent mediates the authentication ceremony.
6765+
6766+
1. Set conditionalCreateLifetimeTimer to a client-specific default.
6767+
6768+
1. Set conditionalCreateOrigin to the current origin.
6769+
6770+
1. If the user agent mediates the authentication ceremony while the conditional assertion is running:
6771+
6772+
1. Start conditionalCreateLifetimeTimer.
6773+
6774+
1. Optionally collect an [=authorization gesture=] confirming [=user consent=] to create the credential which may later be used to skip (this step)[#op-makecred-step-user-consent] when processing an associated {{CredentialsContainer/get()|navigator.credentials.get()}} call with <code>|options|.{{CredentialRequestOptions/mediation}}</code> set to {{CredentialMediationRequirement/conditional}}.
6775+
6776+
: Client extension output
6777+
:: None
6778+
67176779

67186780
### Credential Properties Extension (<dfn>credProps</dfn>) ### {#sctn-authenticator-credential-properties-extension}
67196781

0 commit comments

Comments
 (0)