Skip to content

Commit 2ef077c

Browse files
committed
attempt to specify http-post-application-octet-stream mechanism
1 parent 05d7fc2 commit 2ef077c

File tree

1 file changed

+32
-1
lines changed

1 file changed

+32
-1
lines changed

peps/pep-0694.rst

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,8 @@ The successful response includes the following JSON content:
444444
"valid-for": 3600,
445445
"mechanism": {
446446
"http-post-application-octet-stream": {
447-
"url": "..."
447+
"file_url": "..."
448+
"attestations_url": "..."
448449
}
449450
}
450451
}
@@ -756,6 +757,36 @@ with that implementation's file upload mechanism name.
756757
All implementations of this PEP **MUST** implement the ``http-post-application-octet-stream`` file
757758
upload mechanism.
758759

760+
``http-post-application-octet-stream`` Mechanism
761+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
762+
763+
The ``http-post-application-octet-stream`` mechansism **MUST** be supported servers which
764+
implement this PEP.
765+
766+
A client executes this mechanism by submitting a ``POST`` request to the ``file_url`` returned in the
767+
``http-post-application-octet-stream`` map of the ``mechanism`` map of the
768+
:ref:`file upload session creation response body <file-upload-session-response>` like:
769+
770+
.. code-block:: text
771+
772+
Content-Type: application/octet-stream
773+
774+
<binary contents of the file to upload>
775+
776+
Servers **MAY** support uploading of digital attestations for files (see :pep:`740`).
777+
This support will be indicated by inclusion of an ``attestations_url`` key in the
778+
``http-post-application-octet-stream`` map of the ``mechanism`` map of the
779+
:ref:`file upload session creation response body <file-upload-session-response>`.
780+
781+
To upload an attestation, a client submits a ``POST`` request to the ``attestations_url``
782+
containing a JSON array of :pep:`attestation objects <740#attestation-objects>` like:
783+
784+
.. code-block:: text
785+
786+
Content-Type: application/json
787+
788+
[{"version": 1, "verification_material": {...}, "envelope": {...}},...]
789+
759790
760791
Content Types
761792
-------------

0 commit comments

Comments
 (0)