summary refs log tree commit diff
diff options
context:
space:
mode:
authorHubert Chathi <hubert@uhoreg.ca>2018-11-26 11:11:51 -0500
committerHubert Chathi <hubert@uhoreg.ca>2018-11-26 11:11:51 -0500
commit199325bfd6644776b35dc308a02825a54bde3fbb (patch)
treea2d22023f2843fb88785c74439c8d87613851253
parentadd changelog (diff)
downloadsynapse-199325bfd6644776b35dc308a02825a54bde3fbb.tar.xz
update comment on keys/query and copyright header
-rw-r--r--synapse/rest/client/v2_alpha/keys.py31
1 files changed, 18 insertions, 13 deletions
diff --git a/synapse/rest/client/v2_alpha/keys.py b/synapse/rest/client/v2_alpha/keys.py
index 47ca92ee3e..666ac9637f 100644
--- a/synapse/rest/client/v2_alpha/keys.py
+++ b/synapse/rest/client/v2_alpha/keys.py
@@ -1,5 +1,6 @@
 # -*- coding: utf-8 -*-
 # Copyright 2015, 2016 OpenMarket Ltd
+# Copyright 2018 New Vector Ltd
 #
 # Licensed under the Apache License, Version 2.0 (the "License");
 # you may not use this file except in compliance with the License.
@@ -140,19 +141,23 @@ class KeyQueryServlet(RestServlet):
               // Must be signed by this server.
               "<server_name>": {
                 "<algorithm>:<key_id>": "<signature_base64>"
-      } } } } },
-      "attestations": [
-        "user_id": "<user_id>",
-        "device_id": "<device_id>",
-        "keys": {
-          "ed25519": "<key_base64>"
-        },
-        "state": "<verified or revoked>",
-        "signatures": {
-          "<algorithm>:<device_id>": "<signature_base64>"
-        }
-      ]
-    }
+            },
+            "unsigned": {
+              "device_display_name": "<device_name>"
+              "attestations": [ // attestations on this device
+                {
+                  "user_id": "<user_id>",
+                  "device_id": "<device_id>",
+                  "keys": {
+                    "<algorithm>:<key_id>": "<key_base64>"
+                  },
+                  "state": "<verified or revoked>",
+                  "signatures": {
+                    "<user_id>": { // user_id of the user making the attestation
+                      "<algorithm>:<device_id>": "<signature_base64>"
+                } } }
+              ]
+    } } } } } }
     """
 
     PATTERNS = client_v2_patterns("/keys/query$")