diff --git a/index.bs b/index.bs index 4d5f5bacb..2b9c86c5a 100644 --- a/index.bs +++ b/index.bs @@ -1913,7 +1913,15 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o : If the user exercises a user agent user-interface option to cancel the process, :: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator| - and [=set/remove=] |authenticator| from |issuedRequests|. Throw a "{{NotAllowedError}}" {{DOMException}}. + and [=set/remove=] |authenticator| from |issuedRequests|. + + If the user agent is informing the user that + the last used |authenticator| cannot collect [=user verification=] when + |pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}} + is set to {{UserVerificationRequirement/required}}, + throw a "{{UserVerificationError}}" {{DOMException}}. + + Otherwise, throw an "{{OptOutError}}" {{DOMException}}. : If |options|.{{CredentialCreationOptions/signal}} is present and [=AbortSignal/aborted=], :: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] @@ -2181,7 +2189,9 @@ a numbered step. If outdented, it (today) is rendered as a bullet in the midst o -1. Throw a "{{NotAllowedError}}" {{DOMException}}. +1. Throw a "{{TimeoutError}}" {{DOMException}}. In order to prevent information leak that could identify the + user without [=user consent|consent=], this step MUST NOT be executed before |lifetimeTimer| has expired. See + [[#sctn-make-credential-privacy]] for details. During the above process, the user agent SHOULD show some UI to the user to guide them in the process of selecting and authorizing an authenticator. When |options|.{{CredentialCreationOptions/mediation}} is set to {{CredentialMediationRequirement/conditional}}, prominent modal UI should not be shown unless credential creation was previously consented to via means determined by the user agent. @@ -2225,9 +2235,15 @@ The following {{DOMException}} exceptions can be raised: the [=client=] does not support [[#sctn-related-origins|related origin requests]] or the [$related origins validation procedure$] failed. + : {{TimeoutError}} + :: The ceremony was cancelled by the user agent after exceeding the time limit permitted for the ceremony. + See [[#sctn-timeout-recommended-range]] for more information. + + : {{UserVerificationError}} + :: The user was unable to complete [=user verification=] as required by the [=[RP]=]. + : {{NotAllowedError}} - :: A catch-all error covering a wide range of possible reasons, - including common ones like the user canceling out of the ceremony. + :: A catch-all error covering a wide range of possible reasons. Some of these causes are documented throughout this spec, while others are client-specific. @@ -2450,7 +2466,15 @@ When this method is invoked, the user agent MUST execute the following algorithm : If the user exercises a user agent user-interface option to cancel the process, :: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator| - and [=set/remove=] |authenticator| from |issuedRequests|. Throw a "{{NotAllowedError}}" {{DOMException}}. + and [=set/remove=] |authenticator| from |issuedRequests|. + + If the user agent is informing the user that + the last used |authenticator| cannot collect [=user verification=] when + |pkOptions|.{{PublicKeyCredentialCreationOptions/authenticatorSelection}}.{{AuthenticatorSelectionCriteria/userVerification}} + is set to {{UserVerificationRequirement/required}}, + throw a "{{UserVerificationError}}" {{DOMException}}. + + Otherwise, throw an "{{OptOutError}}" {{DOMException}}. : If |options|.{{CredentialRequestOptions/signal}} is present and [=AbortSignal/aborted=], :: [=set/For each=] |authenticator| in |issuedRequests| invoke the [=authenticatorCancel=] operation on |authenticator| @@ -2629,7 +2653,9 @@ When this method is invoked, the user agent MUST execute the following algorithm 1. Return |pubKeyCred| and terminate this algorithm. -1. Throw a "{{NotAllowedError}}" {{DOMException}}. +1. Throw a "{{TimeoutError}}" {{DOMException}}. In order to prevent information leak that could identify the + user without [=user consent|consent=], this step MUST NOT be executed before |lifetimeTimer| has expired. See + [[#sctn-assertion-privacy]] for details. @@ -2782,9 +2808,15 @@ The following {{DOMException}} exceptions can be raised: the [=client=] does not support [[#sctn-related-origins|related origin requests]] or the [$related origins validation procedure$] failed. + : {{TimeoutError}} + :: The ceremony was cancelled by the user agent after exceeding the time limit permitted for the ceremony. + See [[#sctn-timeout-recommended-range]] for more information. + + : {{UserVerificationError}} + :: The user was unable to complete [=user verification=] as required by the [=[RP]=]. + : {{NotAllowedError}} - :: A catch-all error covering a wide range of possible reasons, - including common ones like the user canceling out of the ceremony. + :: A catch-all error covering a wide range of possible reasons. Some of these causes are documented throughout this spec, while others are client-specific. @@ -3952,6 +3984,33 @@ should continue. When the {{Window}} object associated with the [=Document=] los SHOULD be aborted. +## WebAuthn Interfaces ## {#sctn-interfaces} + +The subection below defines custom interfaces used throughout WebAuthn. + +### Custom WebAuthn Exceptions ### {#iface-custom-webauthn-exceptions} + +For descriptions of these exceptions, +please see [[#sctn-create-request-exceptions]] and [[#sctn-get-request-exceptions]]. + + +[Exposed=Window, Serializable] +interface UserVerificationError : DOMException { + constructor(optional DOMString message = ""); +}; + + +The new UserVerificationError(|message|) constructor steps are: + +1. Set [=this=]'s {{DOMException/name}} to `"UserVerificationError"`. +1. Set [=this=]'s {{DOMException/message}} to `message`. + +{{UserVerificationError}} objects are [=serializable objects=]. + +Their [=serialization steps=], given |value| and |serialized|, are to run the {{DOMException}} [=serialization steps=] given |value| and |serialized|. + +Their [=deserialization steps=], given |serialized| and |value|, are to run the {{DOMException}} [=deserialization steps=] given |serialized| and |value|. + ## WebAuthn Extensions Inputs and Outputs ## {#sctn-extensions-inputs-outputs} The subsections below define the data types used for conveying [=WebAuthn extension=] inputs and outputs.