@@ -2953,7 +2953,7 @@ value and terminate the operation.
2953
2953
2954
2954
</div>
2955
2955
2956
- ### Signal Credential Changes to the Authenticator - PublicKeyCredential's [=signal methods=] ### {#sctn-signalMethods }
2956
+ ### Signal Credential Changes to the Authenticator - PublicKeyCredential's [=signal methods=] ### {#sctn-signal-methods }
2957
2957
2958
2958
<xmp class="idl">
2959
2959
partial interface PublicKeyCredential {
@@ -2963,18 +2963,18 @@ value and terminate the operation.
2963
2963
};
2964
2964
2965
2965
dictionary UnknownCredentialIdOptions {
2966
- required USVString rpId;
2966
+ required DOMString rpId;
2967
2967
required Base64URLString credentialId;
2968
2968
};
2969
2969
2970
2970
dictionary AllAcceptedCredentialIdsOptions {
2971
- required USVString rpId;
2971
+ required DOMString rpId;
2972
2972
required Base64URLString userId;
2973
2973
required sequence<Base64URLString> allAcceptedCredentialIds;
2974
2974
};
2975
2975
2976
2976
dictionary CurrentUserDetailsOptions {
2977
- required USVString rpId;
2977
+ required DOMString rpId;
2978
2978
required Base64URLString userId;
2979
2979
required DOMString name;
2980
2980
required DOMString displayName;
@@ -3008,6 +3008,28 @@ finish executing the [=signal method/authenticator actions=] to protect users
3008
3008
from [=[WRPS]=] gaining information about availability of their credentials
3009
3009
without [=user consent=] from the timing of the request.
3010
3010
3011
+ #### <dfn abstract-op>Asynchronous RP ID validation algorithm</dfn> #### {#sctn-signal-methods-async-rp-id-validation}
3012
+
3013
+ The [$Asynchronous RP ID validation algorithm$] lets [=signal methods=] validate
3014
+ [=RP IDs=] [=in parallel=]. The algorithm takes a {{DOMString}} |rpId| as input
3015
+ and returns a promise that rejects if the validation fails. The steps are:
3016
+
3017
+ 1. Let |effectiveDomain| be the |callerOrigin|'s [=effective domain=]. If
3018
+ [=effective domain=] is not a [=valid domain=], then return [=a promise
3019
+ rejected with=] "{{SecurityError}}" {{DOMException}}.
3020
+ 1. If |rpId| [=is a registrable domain suffix of or is equal to=]
3021
+ |effectiveDomain|, return [=a promise resolved with=] undefined.
3022
+ 1. If the client does not support [[#sctn-related-origins|related origin
3023
+ requests]], return [=a promise rejected with=] a "{{SecurityError}}"
3024
+ {{DOMException}}.
3025
+ 1. Let |p| be [=a new promise=].
3026
+ 1. Execute the following steps [=in parallel=]:
3027
+ 1. If the result of running the [$related origins validation procedure$]
3028
+ with arguments |callerOrigin| and |rpId| is [TRUE], then [=resolve=]
3029
+ |p|.
3030
+ 1. Otherwise, [=reject=] |p| with a "{{SecurityError}}" {{DOMException}}.
3031
+ 1. Return |p|.
3032
+
3011
3033
#### {{PublicKeyCredential/signalUnknownCredentialId(options)}} #### {#sctn-signalUnknownCredentialId}
3012
3034
3013
3035
Signals that a [=credential id=] was not recognized by the [=[WRP]=], e.g.
@@ -3020,26 +3042,18 @@ and the [=userHandle=], avoiding a privacy leak to an unauthenticated caller
3020
3042
Upon execution of {{PublicKeyCredential/signalUnknownCredentialId(options)}},
3021
3043
the [=client=] executes these steps:
3022
3044
3023
- 1. Let |effectiveDomain| be the |callerOrigin|'s [=effective domain=]. If
3024
- [=effective domain=] is not a [=valid domain=], then throw a
3025
- "{{SecurityError}}" {{DOMException}}.
3026
- 1. If <code>|options|.{{UnknownCredentialIdOptions/rpId}}</code> [=is not a
3027
- registrable domain suffix of and is not equal to=] |effectiveDomain|, then
3028
- throw a "{{SecurityError}}" {{DOMException}}.
3029
-
3030
- TODO: this may require updating once #2040 lands.
3031
3045
1. If the result of [=base64url encoding | base64url decoding=]
3032
3046
<code>|options|.{{UnknownCredentialIdOptions/credentialId}}</code> is an
3033
- error, then throw a {{TypeError}}.
3047
+ error, then return [=a promise rejected with=] a {{TypeError}}.
3048
+ 1. Let |p| be the result of executing the [$Asynchronous RP ID validation
3049
+ algorithm$] with <code>|options|.{{UnknownCredentialIdOptions/rpId}}</code>.
3050
+ 1. [=Upon fulfillment=] of |p|, run the following steps [=in parallel=]:
3051
+ 1. For every [=authenticator=] presently available on this [=client
3052
+ platform=], invoke the [=signal method/authenticator
3053
+ action/unknownCredentialId=] [=authenticator action=] with |options| as
3054
+ input.
3055
+ 1. Return |p|.
3034
3056
3035
- 1. Run the following steps [=in parallel=]:
3036
- 1. For every [=authenticator=] presently available on this [=client
3037
- platform=], invoke the [=signal method/authenticator
3038
- action/unknownCredentialId=] [=authenticator action=] with |options|
3039
- as input.
3040
-
3041
- 1. Return [=a promise resolved with=] `undefined`.
3042
-
3043
3057
The <dfn for="signal method/authenticator action">unknownCredentialId</dfn>
3044
3058
[=signal method/authenticator action=] takes an {{UnknownCredentialIdOptions}}
3045
3059
|options| and is as follows:
@@ -3082,27 +3096,23 @@ Upon execution of
3082
3096
{{PublicKeyCredential/signalAllAcceptedCredentialIds(options)}}, the [=client=]
3083
3097
executes these steps:
3084
3098
3085
- 1. Let |effectiveDomain| be the |callerOrigin|'s [=effective domain=]. If
3086
- [=effective domain=] is not a [=valid domain=], then throw a
3087
- "{{SecurityError}}" {{DOMException}}.
3088
- 1. If <code>|options|.{{AllAcceptedCredentialIdsOptions/rpId}}</code> [=is not a
3089
- registrable domain suffix of and is not equal to=] |effectiveDomain|, then
3090
- throw a "{{SecurityError}}" {{DOMException}}.
3091
-
3092
- TODO: this may require updating once #2040 lands.
3093
3099
1. If the result of [=base64url encoding | base64url decoding=]
3094
3100
<code>|options|.{{AllAcceptedCredentialIdsOptions/userId}}</code> is an
3095
- error, then throw a {{TypeError}}.
3101
+ error, then return [=a promise rejected with=] a {{TypeError}}.
3096
3102
1. [=list/For each=] |credentialId| in
3097
3103
<code>|options|.{{AllAcceptedCredentialIdsOptions/allAcceptedCredentialIds}}</code>:
3098
3104
1. If the result of [=base64url encoding | base64url decoding=]
3099
- |credentialId| is an error, then throw a {{TypeError}}.
3100
-
3101
- 1. Run the following steps [=in parallel=]:
3105
+ |credentialId| is an error, then return [=a promise rejected with=] a
3106
+ {{TypeError}}.
3107
+ 1. Let |p| be the result of executing the [$Asynchronous RP ID validation
3108
+ algorithm$] with
3109
+ <code>|options|.{{AllAcceptedCredentialIdsOptions/rpId}}</code>.
3110
+ 1. [=Upon fulfillment=] of |p|, run the following steps [=in parallel=]:
3102
3111
1. For every [=authenticator=] presently available on this [=client
3103
3112
platform=], invoke the [=signal method/authenticator
3104
3113
actions/allAcceptedCredentialIds=] [=authenticator action=] with
3105
3114
|options| as input.
3115
+ 1. Return |p|.
3106
3116
3107
3117
The <dfn for="signal method/authenticator
3108
3118
actions">allAcceptedCredentialIds</dfn> [=signal method/authenticator
@@ -3169,23 +3179,18 @@ Signals the user's current {{PublicKeyCredentialEntity/name}} and
3169
3179
Upon execution of {{PublicKeyCredential/signalCurrentUserDetails(options)}}, the
3170
3180
[=client=] executes these steps:
3171
3181
3172
- 1. Let |effectiveDomain| be the |callerOrigin|'s [=effective domain=]. If
3173
- [=effective domain=] is not a [=valid domain=], then throw a
3174
- "{{SecurityError}}" {{DOMException}}.
3175
- 1. If <code>|options|.{{CurrentUserDetailsOptions/rpId}}</code> [=is not a
3176
- registrable domain suffix of and is not equal to=] |effectiveDomain|, then
3177
- throw a "{{SecurityError}}" {{DOMException}}.
3178
-
3179
- TODO: this may require updating once #2040 lands.
3180
3182
1. If the result of [=base64url encoding | base64url decoding=]
3181
- <code>|options|.{{CurrentUserDetailsOptions/userId}}</code> is an error, then
3182
- throw a {{TypeError}}.
3183
-
3184
- 1. Run the following steps [=in parallel=]:
3183
+ <code>|options|.{{CurrentUserDetailsOptions/userId}}</code> is an error,
3184
+ then return [=a promise rejected with=] a {{TypeError}}.
3185
+ 1. Let |p| be the result of executing the [$Asynchronous RP ID validation
3186
+ algorithm$] with
3187
+ <code>|options|.{{CurrentUserDetailsOptions/rpId}}</code>.
3188
+ 1. [=Upon fulfillment=] of |p|, run the following steps [=in parallel=]:
3185
3189
1. For every [=authenticator=] presently available on this [=client
3186
3190
platform=], invoke the [=signal method/authenticator
3187
3191
actions/currentUserDetails=] [=authenticator action=] with |options|
3188
3192
as input.
3193
+ 1. Return |p|.
3189
3194
3190
3195
The <dfn for="signal method/authenticator actions">currentUserDetails</dfn>
3191
3196
[=signal method/authenticator action=] takes a {{CurrentUserDetailsOptions}}
0 commit comments