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

Add permissions-policy check for publicKey credentials #182

Merged
merged 4 commits into from
Jan 6, 2022
Merged
Changes from 3 commits
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
11 changes: 11 additions & 0 deletions index.bs
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,9 @@ spec: FETCH; urlPrefix: https://fetch.spec.whatwg.org/
spec: promises-guide-1; urlPrefix: https://www.w3.org/2001/tag/doc/promises-guide
type: dfn
text: promise-calling; url: should-promise-call
spec: infra; urlPrefix: https://infra.spec.whatwg.org/
type: dfn
text: exists; url: map-exists
equalsJeffH marked this conversation as resolved.
Show resolved Hide resolved
</pre>

<pre class="link-defaults">
Expand Down Expand Up @@ -831,6 +834,14 @@ spec:css-syntax-3;
1. Let |sameOriginWithAncestors| be `true` if |settings| is [=same-origin with its
ancestors=], and `false` otherwise.

1. If |options|[{{CredentialRequestOptions/publicKey}}] [=exists=] then
equalsJeffH marked this conversation as resolved.
Show resolved Hide resolved
if |settings|' [=responsible document=] is **not** [=allowed to use=] the
<a data-lt="publickey-credentials-get-feature">publickey-credentials-get</a>
equalsJeffH marked this conversation as resolved.
Show resolved Hide resolved
[=policy-controlled feature=] return [=a promise rejected with=] a "{{NotAllowedError}}" {{DOMException}}.

Note: <a const>`password`</a> and <a const>`federated`</a> [=credential types=] are not presently
treated as [=policy-controlled features=], although this may change in the future.

1. Run the following steps [=in parallel=]:

1. Let |credentials| be the result of <a abstract-op lt="collect local">collecting
Expand Down