Skip to content

Commit b2b46a9

Browse files
committed
Add clarification for media type
All media types declared with IANA registered the same subtype. This commit addresses it. In addition, this commit makes the Content-Type for request and responses normative with `MUST be`. Closes ietf-wg-privacypass#33
1 parent fa9a71a commit b2b46a9

File tree

1 file changed

+27
-16
lines changed

1 file changed

+27
-16
lines changed

Diff for: draft-ietf-privacypass-batched-tokens.md

+27-16
Original file line numberDiff line numberDiff line change
@@ -222,9 +222,10 @@ The structure fields are defined as follows:
222222

223223
The Client then generates an HTTP POST request to send to the Issuer Request
224224
URL, with the BatchTokenRequest as the content. The media type for this request
225-
is "application/private-token-privately-verifiable-batch-request". An example
226-
request for the Issuer Request URL "https://issuer.example.net/request" is shown
227-
below.
225+
MUST be "application/private-token-privately-verifiable-batch-request". If not,
226+
the Issuer responds with status code 415.
227+
An example request for the Issuer Request URL
228+
"https://issuer.example.net/request" is shown below.
228229

229230
~~~
230231
POST /request HTTP/1.1
@@ -324,9 +325,11 @@ The structure fields are defined as follows:
324325
Scalar values, computed as `concat(SerializeScalar(proof[0]),
325326
SerializeScalar(proof[1]))`, where Ns is as defined in {{OPRF, Section 4}}.
326327

327-
The Issuer generates an HTTP response with status code 200 whose content
328+
The Issuer MUST generate an HTTP response with status code 200 whose content
328329
consists of TokenResponse, with the content type set as
329-
"application/private-token-privately-verifiable-batch-response".
330+
"application/private-token-privately-verifiable-batch-response". Clients MUST
331+
ignore the response if the status code is not 200 or if the content type is not
332+
"application/private-token-arbitrary-batch-response".
330333

331334
~~~
332335
HTTP/1.1 200 OK
@@ -456,8 +459,10 @@ The structure fields are defined as follows:
456459

457460
The Client then generates an HTTP POST request to send to the Issuer Request
458461
URL, with the BatchTokenRequest as the content. The media type for this request
459-
is "application/private-token-arbitrary-batch-request". An example request for
460-
the Issuer Request URL "https://issuer.example.net/request" is shown below.
462+
MUST be "application/private-token-arbitrary-batch-request". If not, the Issuer
463+
responds with status code 415.
464+
An example request for the Issuer Request URL
465+
"https://issuer.example.net/request" is shown below.
461466

462467
~~~
463468
POST /request HTTP/1.1
@@ -509,8 +514,10 @@ prefixed with two bytes. OptionalTokenResponse.token_response is a
509514
length-prefix-encoded TokenResponse, where a length of 0 indicates that the
510515
Issuer failed or refused to issue the associated TokenRequest.
511516

512-
The Issuer generates an HTTP response with status code 200 whose content
517+
The Issuer MUST generate an HTTP response with status code 200 whose content
513518
consists of TokenResponse, with the content type set as
519+
"application/private-token-arbitrary-batch-response". Clients MUST ignore the
520+
response if the status code is not 200 or if the content type is not
514521
"application/private-token-arbitrary-batch-response".
515522

516523
If the Issuer issues some tokens but not all, it MUST return an HTTP 206 to the
@@ -592,7 +599,7 @@ Type name:
592599

593600
Subtype name:
594601

595-
: private-token-request
602+
: private-token-privately-verifiable-batch-request
596603

597604
Required parameters:
598605

@@ -620,7 +627,8 @@ Published specification:
620627

621628
Applications that use this media type:
622629

623-
: Applications that want to issue or facilitate issuance of Privacy Pass tokens,
630+
: Applications that want to issue or facilitate issuance of Privacy Pass
631+
Batched Privately Verifiable tokens as defined in {{batched-private}},
624632
including Privacy Pass issuer applications themselves.
625633

626634
Fragment identifier considerations:
@@ -665,7 +673,7 @@ Type name:
665673

666674
Subtype name:
667675

668-
: private-token-response
676+
: private-token-privately-verifiable-batch-response
669677

670678
Required parameters:
671679

@@ -693,7 +701,8 @@ Published specification:
693701

694702
Applications that use this media type:
695703

696-
: Applications that want to issue or facilitate issuance of Privacy Pass tokens,
704+
: Applications that want to issue or facilitate issuance of Privacy Pass
705+
Batched Privately Verifiable tokens as defined in {{batched-private}},
697706
including Privacy Pass issuer applications themselves.
698707

699708
Fragment identifier considerations:
@@ -738,7 +747,7 @@ Type name:
738747

739748
Subtype name:
740749

741-
: private-token-request
750+
: private-token-arbitrary-batch-request
742751

743752
Required parameters:
744753

@@ -766,7 +775,8 @@ Published specification:
766775

767776
Applications that use this media type:
768777

769-
: Applications that want to issue or facilitate issuance of Privacy Pass tokens,
778+
: Applications that want to issue or facilitate issuance of Privacy Pass
779+
Arbitrary Batched tokens as defined in {{batched-arbitrary}},
770780
including Privacy Pass issuer applications themselves.
771781

772782
Fragment identifier considerations:
@@ -811,7 +821,7 @@ Type name:
811821

812822
Subtype name:
813823

814-
: private-token-response
824+
: private-token-arbitrary-batch-response
815825

816826
Required parameters:
817827

@@ -839,7 +849,8 @@ Published specification:
839849

840850
Applications that use this media type:
841851

842-
: Applications that want to issue or facilitate issuance of Privacy Pass tokens,
852+
: Applications that want to issue or facilitate issuance of Privacy Pass
853+
Arbitrary Batched tokens as defined in {{batched-arbitrary}},
843854
including Privacy Pass issuer applications themselves.
844855

845856
Fragment identifier considerations:

0 commit comments

Comments
 (0)