Skip to content

Commit

Permalink
change providers to requests (#165)
Browse files Browse the repository at this point in the history
  • Loading branch information
marcoscaceres authored Sep 18, 2024
1 parent b6c64a1 commit 1b4cfeb
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 25 deletions.
4 changes: 2 additions & 2 deletions explainer.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ async function requestLicense() {
const oid4pv = {
// Protocol extensibility:
protocol: "oid4vp", // An example of an OpenID4VP request to wallets. // Based on https://github.com/openid/OpenID4VP/issues/125
request: {
data: {
nonce: "n-0S6_WzA2Mj",
presentation_definition: {
// Presentation Exchange request, omitted for brevity
Expand All @@ -55,7 +55,7 @@ async function requestLicense() {
};
const digitalCredential = await navigator.credentials.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 data-dfn-for="digital credential">Presentation request</dfn>
</dt>
<dd>
A presentation request is a request for a [=digital credential=] composed
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 @@ -174,53 +182,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 [=digital credential/presentation
request=]. It is used to specify an [=digital credential/exchange
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 @@ -293,10 +302,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

0 comments on commit 1b4cfeb

Please sign in to comment.