diff --git a/index.bs b/index.bs index 3f8425f..dee468f 100644 --- a/index.bs +++ b/index.bs @@ -504,6 +504,10 @@ spec:css-syntax-3; internal slot named \[[origin]], which stores the [=origin=] for which the {{Credential}} may be [=effective=]. + Credential interfaces can define a default get mediation and + default create mediation as an {{CredentialMediationRequirement}} enum value. + Together, they establish the default [[#mediation-requirements]] for when none are supplied by the developer. + ### `Credential` Internal Methods ### {#credential-internal-methods} The {{Credential}} [=interface object=] features several [=internal methods=] facilitating @@ -700,7 +704,7 @@ spec:css-syntax-3;
     dictionary CredentialRequestOptions {
-      CredentialMediationRequirement mediation = "optional";
+      CredentialMediationRequirement mediation;
       AbortSignal signal;
     };
   
@@ -988,6 +992,11 @@ spec:css-syntax-3; 1. If |interfaces| is [=set/empty=], then return[=a promise rejected with=] a "{{NotSupportedError}}" {{DOMException}}. + 1. If |options|.{{CredentialRequestOptions/mediation}} was not passed, + set |options|.{{CredentialRequestOptions/mediation}} to one of the following values: + 1. If the |interfaces| together define a [=Credential/default get mediation=], that enum value. + 1. Otherwise, {{CredentialMediationRequirement/optional}}. + 1. [=set/For each=] |interface| of |interfaces|: 1. If |options|.{{CredentialRequestOptions/mediation}} is @@ -1194,6 +1203,11 @@ spec:css-syntax-3; 1. Let |interfaces| be the [=set=] of |options|' relevant credential interface objects. + 1. If |options|.{{CredentialRequestOptions/mediation}} was not passed, + set |options|.{{CredentialRequestOptions/mediation}} to one of the following values: + 1. If the |interfaces| together define a [=Credential/default create mediation=], that enum value. + 1. Otherwise, {{CredentialMediationRequirement/optional}}. + 1. Return [=a promise rejected with=] `NotSupportedError` if any of the following statements are true: @@ -2477,6 +2491,16 @@ spec:css-syntax-3; mediation=], define `ExampleCredential/isConditionalMediationAvailable()` to return a new {{Promise}} that [=resolves=] with `true`. + 1. Optionally, define a [=Credential/default get mediation=] and, optionally, a [=Credential/default create mediation=]. + +
+
+ The default get mediation for the `ExampleCredential` is "{{CredentialMediationRequirement/required}}". +
+
+ + Additionally, a specification can add its own set of restriction around what mediations are allowed to be passed into the API. + 1. Following the procedure in [[#sctn-registry-requirements]], add an entry to the [[#sctn-cred-type-registry|Credential Type Registry]] for the new "example" [=credential type registry/credential type=] and its corresponding: