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 FedCM #204

Merged
merged 3 commits into from
Aug 30, 2022
Merged
Changes from 2 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 @@ -72,8 +72,13 @@ spec: web-otp; urlPrefix: https://wicg.github.io/web-otp
type: interface
text: OTPCredential; url: otpcredential
spec: FEDCM; urlPrefix: https://fedidcg.github.io/FedCM
type: dfn
text: identity-credentials-get
type: interface
text: IdentityCredential; url: identitycredential
type: dict-member
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I guess we should export these from FedCM so they can automagically be used here... but this is fine for now.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I'm curious why they don't get picked up, I tried exporting the PP name. The spec works for now, but I'll ask someone wiser than me what we're doing wrong here..

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Talked to wise sage @tabatkins who will add FedCM to the spec database for us(in a grand ceremony, I expect). That should fix this.

Thank you, Tab!

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Added now, give the database an hour or so for the next run to pick up the definitions.

for: CredentialRequestOptions
text: identity; url: dom-credentialrequestoptions-identity
</pre>

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

1. If |options|[{{CredentialRequestOptions/identity}}] [=map/exists=] then
johannhof marked this conversation as resolved.
Show resolved Hide resolved
if |settings|' [=relevant global object=]'s [=associated Document=] is **not**
[=allowed to use=] the [=identity-credentials-get=]
[=policy-controlled feature=] return [=a promise rejected with=] a "{{NotAllowedError}}"
{{DOMException}}.

1. If |options|[{{CredentialRequestOptions/publicKey}}] [=map/exists=] then
if |settings|' [=relevant global object=]'s [=associated Document=] is **not**
[=allowed to use=] the [=publickey-credentials-get-feature|publickey-credentials-get=]
Expand Down