Skip to content

Commit cd36c94

Browse files
Trust Tokens: clean up a few syntax errors, and add context to a callout
* Trust Tokens docs: clean up a few syntax errors, and add context to a callout This change makes two slight changes to web.dev/trust-tokens: * It updates examples' syntax to no longer use the `issuer` argument in issuance and redemption operations (it's not used in these operations), and to swap it out for `issuers`, a list, in signing operations. * It replaces a reference to "version 2 of the API" in a "Caution" callout with "updated syntax available since Chrome 88"; the reference to "version 2" seems hard to interpret since we don't give the reader any definition of the different versions. * Change a caution aside to a note aside
1 parent 658f595 commit cd36c94

File tree

1 file changed

+5
-7
lines changed
  • src/site/content/en/blog/trust-tokens

1 file changed

+5
-7
lines changed

src/site/content/en/blog/trust-tokens/index.md

+5-7
Original file line numberDiff line numberDiff line change
@@ -112,8 +112,8 @@ websites from tracking users through them.</p>
112112
The following is adapted from
113113
[sample code in the API explainer](https://github.com/WICG/trust-token-api#sample-api-usage).
114114

115-
{% Aside 'caution' %}
116-
The code in this post uses version 2 of the API.
115+
{% Aside %}
116+
The code in this post uses updated syntax available since Chrome 88.
117117
{% endAside %}
118118

119119
Imagine that a user visits a news website (`publisher.example`) which embeds
@@ -165,7 +165,7 @@ document:
165165
fetch('foo.example/get-content', {
166166
trustToken: {
167167
type: 'send-redemption-record',
168-
issuer: 'https://issuer.example'
168+
issuers: ['https://issuer.example']
169169
}
170170
});
171171
```
@@ -197,8 +197,7 @@ If the user is deemed to be trustworthy by a trust token issuer such as
197197
```js
198198
fetch('issuer.example/.well-known/trust-token', {
199199
trustToken: {
200-
type: 'token-request',
201-
issuer: <issuer>
200+
type: 'token-request'
202201
}
203202
}).then(...)
204203
```
@@ -235,7 +234,6 @@ fetch('issuer.example/.well-known/trust-token', {
235234
...
236235
trustToken: {
237236
type: 'token-redemption',
238-
issuer: 'issuer.example',
239237
refreshPolicy: 'none'
240238
}
241239
...
@@ -250,7 +248,7 @@ fetch('<url>', {
250248
...
251249
trustToken: {
252250
type: 'send-redemption-record',
253-
issuer: <issuer>,
251+
issuers: [<issuer>, ...]
254252
}
255253
...
256254
}).then(...);

0 commit comments

Comments
 (0)