Skip to content

Commit

Permalink
Disallow empty credential selection (#250)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres authored Jul 29, 2024
1 parent 991c1ec commit 7432408
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -983,22 +983,23 @@ spec:css-syntax-3;
then return [=a promise rejected with=]
<code>|options|.{{CredentialRequestOptions/signal}}</code>'s [=AbortSignal/abort reason=].

1. If <code>|options|.{{CredentialRequestOptions/mediation}}</code> is
"{{CredentialMediationRequirement/conditional}}":
1. Let |interfaces| be |options|'s [=relevant credential interface objects=].

1. For each |interface| in |options|' [=relevant credential interface objects=]:
1. If |interfaces| is [=set/empty=], then return[=a promise rejected with=]
a "{{NotSupportedError}}" {{DOMException}}.

1. If |interface| does not support {{CredentialMediationRequirement/conditional}}
[=user mediation=], return [=a promise rejected with=] a "{{TypeError}}" {{DOMException}}.
1. [=set/For each=] |interface| of |interfaces|:

1. For each |interface| in |options|' <a>relevant credential interface objects</a>:
1. If |options|.{{CredentialRequestOptions/mediation}} is
{{CredentialMediationRequirement/conditional}} and |interface| does
not support {{CredentialMediationRequirement/conditional}}
[=user mediation=], return [=a promise rejected with=]
a "{{TypeError}}" {{DOMException}}.

1. If |settings|' [=active credential types=] [=set/contains=] |interface|'s
{{Credential/[[type]]}}, return [=a promise rejected with=] a "{{NotAllowedError}}"
{{DOMException}}.

1. For each |interface| in |options|' <a>relevant credential interface objects</a>:

1. [=set/Append=] |interface|'s {{Credential/[[type]]}} to |settings|'
[=active credential types=].

Expand Down Expand Up @@ -1082,7 +1083,7 @@ spec:css-syntax-3;

1. [=React=] to |p|:

1. For each |interface| in |options|' <a>relevant credential interface objects</a>:
1. For each |interface| in |interfaces|:

1. [=set/Remove=] |interface|'s {{Credential/[[type]]}} from |settings|'
[=active credential types=].
Expand Down

0 comments on commit 7432408

Please sign in to comment.