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

change providers to requests #165

Merged
merged 8 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from 4 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
2 changes: 1 addition & 1 deletion explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ async function requestLicense() {
};
const digitalCredential = await navigator.identity.get({
digital: {
providers: [oid4pv],
requests: [oid4pv],
},
});
// To be decrypted on the server...
Expand Down
55 changes: 32 additions & 23 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,15 @@ <h2>
</p>
</dd>
<dt>
<dfn data-dfn-for="digital credential">query</dfn>
<dfn>Presentation request</dfn>
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
</dt>
<dd>
A presentation request is a request for a digital credential composed
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
of [=digital credential/request data=] and a [=digital
credential/exchange protocol=].
</dd>
<dt>
<dfn data-dfn-for="digital credential">request data</dfn>
</dt>
<dd>
A format that [=verifier=] software or a [=user agent=] uses, via an
Expand All @@ -114,7 +122,7 @@ <h2>
<dd>
A format that a [=holder|holder's=] software, such as a digital wallet,
uses, via an [=digital credential/exchange protocol=], to respond to a
[=digital credential/query=] by a [=verifier=].
[=digital credential/request data=] by a [=verifier=].
</dd>
<dt>
<dfn data-dfn-for="digital credential">Exchange protocol</dfn>
Expand Down Expand Up @@ -189,53 +197,54 @@ <h2>
</h2>
<pre class="idl">
dictionary DigitalCredentialRequestOptions {
sequence&lt;DigitalCredentialsProvider&gt; providers;
sequence&lt;DigitalCredentialsRequest&gt; requests;
};
</pre>
<h3>
The `providers` member
The `requests` member
</h3>
<p>
The <dfn data-dfn-for="DigitalCredentialRequestOptions">providers</dfn>
The <dfn data-dfn-for="DigitalCredentialRequestOptions">requests</dfn>
specify an [=digital credential/exchange protocol=] and [=digital
credential/query=], which the user agent MAY match against a holder's
software, such as a digital wallet.
credential/request data=], which the user agent MAY match against a
holder's software, such as a digital wallet.
</p>
<h2>
The `DigitalCredentialsProvider` dictionary
The `DigitalCredentialsRequest` dictionary
</h2>
<p>
The {{DigitalCredentialsProvider}} dictionary is used to specify an
[=digital credential/exchange protocol=] and a [=digital
credential/query=], which the user agent MAY match against software used
by a holder, such as a digital wallet.
The {{DigitalCredentialsRequest}} dictionary represents a [=presentation
request]. It is used to specify an [=digital credential/exchange
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
marcoscaceres marked this conversation as resolved.
Show resolved Hide resolved
protocol=] and a [=digital credential/request data=], which the user
agent MAY match against software used by a holder, such as a digital
wallet.
</p>
<pre class="idl">
dictionary DigitalCredentialsProvider {
dictionary DigitalCredentialsRequest {
required DOMString protocol;
required object request;
required object data;
};
</pre>
<h3>
The `protocol` member
</h3>
<p>
The <dfn data-dfn-for="DigitalCredentialsProvider">protocol</dfn> member
The <dfn data-dfn-for="DigitalCredentialsRequest">protocol</dfn> member
denotes the [=digital credential/exchange protocol=] when requesting an
identify credential.
</p>
<p>
The {{DigitalCredentialsProvider/protocol}} member's value is be one of
The {{DigitalCredentialsRequest/protocol}} member's value is be one of
the well-defined keys defined in [[[#protocol-registry]]] or any other
custom one.
</p>
<h3>
The `request` member
The `data` member
</h3>
<p>
The <dfn data-dfn-for="DigitalCredentialsProvider">request</dfn> member
is the request to be handled by the holder's software, such as a digital
wallet.
The <dfn data-dfn-for="DigitalCredentialsRequest">data</dfn> member is
the [=digital credential/request data=] to be handled by the holder's
software, such as a digital wallet.
</p>
<h2>
The `DigitalCredential` interface
Expand Down Expand Up @@ -308,10 +317,10 @@ <h3>
</li>
<li>[=Consume user activation=] of |window|.
</li>
<li>Let |providers| be |options|'s {{CredentialRequestOptions/digital}}'s
{{DigitalCredentialRequestOptions/providers}} member.
<li>Let |requests| be |options|'s {{CredentialRequestOptions/digital}}'s
{{DigitalCredentialRequestOptions/requests}} member.
</li>
<li>If |providers| is empty, [=exception/throw=] a {{TypeError}}.
<li>If |requests| is empty, [=exception/throw=] a {{TypeError}}.
</li>
<li>
<aside class="issue">
Expand Down