summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-09-13 01:51:53 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-09-13 01:51:53 +0200
commita94b3f91e685036ab05275c1e5ce87fd09e7cf61 (patch)
tree0c2806f8f839ccdd5d2c4c92a02a766abe2a4c56
parent5b60b0bd27058efeec74fcccafda11d6a8d64116 (diff)
downloaddocs-a94b3f91e685036ab05275c1e5ce87fd09e7cf61.tar.gz
docs-a94b3f91e685036ab05275c1e5ce87fd09e7cf61.tar.bz2
docs-a94b3f91e685036ab05275c1e5ce87fd09e7cf61.zip
nfc: tunneling
-rw-r--r--taler-nfc-guide.rst45
1 files changed, 45 insertions, 0 deletions
diff --git a/taler-nfc-guide.rst b/taler-nfc-guide.rst
index 83da69af..1c0ecae9 100644
--- a/taler-nfc-guide.rst
+++ b/taler-nfc-guide.rst
@@ -181,3 +181,48 @@ the ``taler://pay`` URI from the example above:
m<-w 9000
+Request tunneling
+=================
+
+Request tunnelling allows tunneling a (very) restricted subset of HTTP through NFC.
+In particular, only JSON request and response bodies are allowed.
+
+It is currently assumed that the requests and responses fit into one APDU frame.
+For devices with more limited maximum APDU sizes, additional TIDs for segmented
+tunnel requests/responsed may be defined in the future.
+
+The request tunneling request/response JSON messages have the following schema:
+
+.. code-block:: tsref
+
+ interface TalerRequestTunnelRequest {
+ // Identifier for the request
+ id: number;
+
+ // Request URL
+ url: string;
+
+ // HTTP method to use
+ method: "post" | "get";
+
+ // Request headers
+ headers?: { [name: string]: string };
+
+ // JSON body for the request, only applicable to GET requests
+ body?: object;
+ }
+
+ interface TalerRequestTunnelResponse {
+ // Identifier for the request
+ id: number;
+
+ // Response HTTP status code,
+ // "0" if there was no response.
+ status: number;
+
+ // JSON body of the response, or undefined
+ // if the response wasn't JSON.
+ // May contain error details if 'status==0'
+ body?: object;
+ }
+