[go: nahoru, domu]

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disallow multiple in-progress credential requests #207

Merged
merged 7 commits into from
Sep 16, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
PerFr
  • Loading branch information
npm1 committed Aug 29, 2022
commit f1383110f8c9bab933b1ac3af69703beeee51b23
34 changes: 14 additions & 20 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -275,8 +275,8 @@ spec:css-syntax-3;
This document depends on the Infra Standard for a number of foundational concepts used in its
algorithms and prose [[!INFRA]].

Each [=/browsing context=] has an associated <dfn noexport>active credential types</dfn>, a [=set=]
which is initially empty.
Each [=/environment settings object=] has an associated <dfn noexport>active credential
types</dfn>, a [=set=] which is initially empty.

### Infrastructure Algorithms ### {#sctn-infra-algorithms}

Expand Down Expand Up @@ -944,18 +944,16 @@ spec:css-syntax-3;

1. Let |p| be [=a new promise=].

1. Let |topLevelBrowsingContext| be |settings|' [=top-level browsing context=].

1. [=map/For each=] |optionKey| → <var ignore>optionValue</var> of |options|:
npm1 marked this conversation as resolved.
Show resolved Hide resolved

1. If |topLevelBrowsingContext|'s [=active credential types=] [=set/contains=] |optionKey|,
[=reject=] |p| with null and return |p|.
1. If |settings|' [=active credential types=] [=set/contains=] |optionKey|, [=reject=] |p|
with null and return |p|.

1. [=map/For each=] |optionKey| → <var ignore>optionValue</var> of |options|:

1. [=set/Append=] |optionKey| to |topLevelBrowsingContext|'s [=active credential types=].
1. [=set/Append=] |optionKey| to |settings|' [=active credential types=].

1. Let |origin| be the [=current settings object=]'s [=environment settings object/origin=].
1. Let |origin| be |settings|' [=environment settings object/origin=].

1. Let |sameOriginWithAncestors| be `true` if |settings| is [=same-origin with its
ancestors=], and `false` otherwise.
Expand Down Expand Up @@ -1034,7 +1032,7 @@ spec:css-syntax-3;

1. [=map/For each=] |optionKey| → <var ignore>optionValue</var> of |options|:

1. [=set/Remove=] |optionKey| from |topLevelBrowsingContext|'s [=active credential types=].
1. [=set/Remove=] |optionKey| from |settings|' [=active credential types=].

1. Return |p|.
</ol>
Expand Down Expand Up @@ -1083,12 +1081,10 @@ spec:css-syntax-3;

1. Let |p| be [=a new promise=].

1. Let |topLevelBrowsingContext| be |settings|' [=top-level browsing context=].

1. If |topLevelBrowsingContext|'s [=active credential types=] [=set/contains=] |credential|'s
1. If |settings|' [=active credential types=] [=set/contains=] |credential|'s
{{Credential/[[type]]}}, [=reject=] |p| with null and return |p|.

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

1. Run the following steps [=in parallel=]:
Expand All @@ -1108,7 +1104,7 @@ spec:css-syntax-3;

Otherwise, [=resolve=] |p| with |r|.

1. [=set/Remove=] |credential|'s {{Credential/[[type]]}} from |topLevelBrowsingContext|'s
1. [=set/Remove=] |credential|'s {{Credential/[[type]]}} from |settings|'
npm1 marked this conversation as resolved.
Show resolved Hide resolved
[=active credential types=].

1. Return |p|.
Expand Down Expand Up @@ -1151,14 +1147,12 @@ spec:css-syntax-3;

1. Let |p| be [=a new promise=].

1. Let |topLevelBrowsingContext| be |settings|' [=top-level browsing context=].

1. Let |type| be |interfaces|[0]'s {{Credential/[[type]]}}.

1. If |topLevelBrowsingContext|'s [=active credential types=] [=set/contains=] |type|,
[=reject=] |p| with null and return |p|.
1. If |settings|' [=active credential types=] [=set/contains=] |type|, [=reject=] |p| with null
and return |p|.

1. [=set/Append=] |type| to |topLevelBrowsingContext|'s [=active credential types=].
1. [=set/Append=] |type| to |settings|' [=active credential types=].

1. Let |origin| be |settings|'s [=environment settings object/origin=].

Expand Down Expand Up @@ -1187,7 +1181,7 @@ spec:css-syntax-3;

1. [=Resolve=] |p| with the result of [=promise-calling=] |r| given |global|.

1. [=set/Remove=] |type| from |topLevelBrowsingContext|'s [=active credential types=].
1. [=set/Remove=] |type| from |settings|' [=active credential types=].
npm1 marked this conversation as resolved.
Show resolved Hide resolved

1. Return |p|.
</ol>
Expand Down