Skip to content

Commit 6150f71

Browse files
authored
Corrections to the response format of /_matrix/identity/v2/store-invite (#1486)
This has been wrong since the dawn of time. Fixes #495
1 parent cafb453 commit 6150f71

File tree

2 files changed

+31
-11
lines changed

2 files changed

+31
-11
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Corrections to the response format of `/_matrix/identity/v2/store-invite`.

data/api/identity/v2_store_invite.yaml

Lines changed: 30 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -142,20 +142,39 @@ paths:
142142
A list of [server's long-term public key, generated ephemeral
143143
public key].
144144
items:
145-
type: string
145+
type: object
146+
title: PublicKey
147+
properties:
148+
public_key:
149+
type: string
150+
description: |
151+
The public key, encoded using [unpadded Base64](/appendices/#unpadded-base64).
152+
key_validity_url:
153+
type: string
154+
description: |
155+
The URI of an endpoint where the validity of this key can be checked
156+
by passing it as a `public_key` query parameter. See
157+
[key management](/identity-service-api/#key-management).
158+
required: ['public_key', 'key_validity_url']
146159
display_name:
147160
type: string
148-
description: The generated (redacted) display_name.
161+
description: The generated (redacted) display name.
149162
required: ['token', 'public_keys', 'display_name']
150-
example:
151-
application/json: {
152-
"token": "sometoken",
153-
"public_keys": [
154-
"serverpublickey",
155-
"ephemeralpublickey"
156-
],
157-
"display_name": "f...@b..."
158-
}
163+
examples:
164+
application/json: {
165+
"token": "sometoken",
166+
"public_keys": [
167+
{
168+
"public_key": "serverPublicKeyBase64",
169+
"key_validity_url": "https://example.com/_matrix/identity/v2/pubkey/isvalid"
170+
},
171+
{
172+
"public_key": "ephemeralPublicKeyBase64",
173+
"key_validity_url": "https://example.com/_matrix/identity/v2/pubkey/ephemeral/isvalid"
174+
}
175+
],
176+
"display_name": "f...@b..."
177+
}
159178
400:
160179
description: |
161180
An error has occurred.

0 commit comments

Comments
 (0)