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 Permission Policy #132

Merged
merged 8 commits into from
Jul 15, 2024
Merged
Show file tree
Hide file tree
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
7 changes: 7 additions & 0 deletions explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,13 @@ Here is an example of how the  the API might be used in practice:
```
You can read a more detailed and technical description of the API in the [specification draft](https://wicg.github.io/digital-identities/).

### Using the API from another origin

The specification allows usage of the API from a remote/third-party origin via the "digital-credentials-get" Permissions Policy. This is useful for scenarios where a website wants to request digital credentials from a wallet provider that is hosted on a different origin. The Permissions Policy can be set on an iframe that embeds the website that wants to use the API. Here is an example of how the Permissions Policy can be set on an iframe:

```HTML
<iframe allow="digital-credentials-get"></iframe>
```

# Alternatives Considered

Expand Down
23 changes: 23 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,29 @@ <h3>
<dfn class="export" data-dfn-for="DigitalCredential">[[\discovery]]</dfn>
whose value is "remote".
</p>
<section class="informative">
<h3>
User consent
</h3>
<p>
The <cite>Digital Credential API</cite> is a [=powerful feature=] that
requires [=express permission=] from an end-user. This requirement is
normatively enforced when calling `navigator.identity.get()` via the
{{DigitalCredential\[[DiscoverFromExternalSource]](origin, options,
sameOriginWithAncestors)}} internal method.
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
</p>
</section>
<section id="permissions-policy" data-cite="permissions-policy">
<h2>
Permissions Policy integration
</h2>
<p>
This specification defines a [=policy-controlled feature=] identified
by the string <dfn class="permission">"digital-credentials-get"</dfn>
Copy link
Collaborator

Choose a reason for hiding this comment

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

FYI we also kicked off the registration in the permissions policy spec here:

https://github.com/w3c/webappsec-permissions-policy/pull/549/files

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Great. I'll add WebKit there too.

[[permissions-policy]]. Its [=policy-controlled feature/default
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
allowlist=] is [=allowlist/'self'=].
</p>
</section>
<h2 id="protocol-registry">
Registry of protocols for requesting digital credential
</h2>
Expand Down