spec verification in DMs and m.key.verification.ready/done
This commit is contained in:
parent
9c8a0e9ca3
commit
b5bdfffa53
13 changed files with 278 additions and 88 deletions
6
data/event-schemas/examples/m.key.verification.done.yaml
Normal file
6
data/event-schemas/examples/m.key.verification.done.yaml
Normal file
|
@ -0,0 +1,6 @@
|
|||
{
|
||||
"type": "m.key.verification.done",
|
||||
"content": {
|
||||
"transaction_id": "S0meUniqueAndOpaqueString"
|
||||
}
|
||||
}
|
10
data/event-schemas/examples/m.key.verification.ready.yaml
Normal file
10
data/event-schemas/examples/m.key.verification.ready.yaml
Normal file
|
@ -0,0 +1,10 @@
|
|||
{
|
||||
"type": "m.key.verification.ready",
|
||||
"content": {
|
||||
"from_device": "BobDevice1",
|
||||
"transaction_id": "S0meUniqueAndOpaqueString",
|
||||
"methods": [
|
||||
"m.sas.v1"
|
||||
]
|
||||
}
|
||||
}
|
|
@ -3,16 +3,16 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Accepts a previously sent `m.key.verification.start` message. Typically sent as a
|
||||
[to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Accepts a previously sent `m.key.verification.start` message.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification process. Must be the same as
|
||||
the one used for the `m.key.verification.start` message.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification process. Must be the same as the one used for the
|
||||
`m.key.verification.start` message.
|
||||
key_agreement_protocol:
|
||||
type: string
|
||||
description: |-
|
||||
|
@ -43,8 +43,10 @@ properties:
|
|||
The hash (encoded as unpadded base64) of the concatenation of the device's
|
||||
ephemeral public key (encoded as unpadded base64) and the canonical JSON
|
||||
representation of the `m.key.verification.start` message.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- transaction_id
|
||||
- method
|
||||
- key_agreement_protocol
|
||||
- hash
|
||||
|
|
|
@ -3,14 +3,15 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Cancels a key verification process/request. Typically sent as a [to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Cancels a key verification process/request.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
The opaque identifier for the verification process/request.
|
||||
Required when sent as a to-device message. The opaque identifier for
|
||||
the verification process/request.
|
||||
reason:
|
||||
type: string
|
||||
description: |-
|
||||
|
@ -56,8 +57,10 @@ properties:
|
|||
gets an unexpected response with `m.unexpected_message`, the client should not
|
||||
respond again with `m.unexpected_message` to avoid the other device potentially
|
||||
sending another error response.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- transaction_id
|
||||
- code
|
||||
- reason
|
||||
type: object
|
||||
|
|
23
data/event-schemas/schema/m.key.verification.done.yaml
Normal file
23
data/event-schemas/schema/m.key.verification.done.yaml
Normal file
|
@ -0,0 +1,23 @@
|
|||
---
|
||||
allOf:
|
||||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Indicates that a verification process/request has completed successfully.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
Required when sent as a to-device message. The opaque identifier for
|
||||
the verification process/request.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
type: object
|
||||
type:
|
||||
enum:
|
||||
- m.key.verification.done
|
||||
type: string
|
||||
type: object
|
|
@ -3,22 +3,24 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Sends the ephemeral public key for a device to the partner device. Typically sent as a
|
||||
[to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Sends the ephemeral public key for a device to the partner device.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification process. Must be the same as
|
||||
the one used for the `m.key.verification.start` message.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification process. Must be the same as the one used for the
|
||||
`m.key.verification.start` message.
|
||||
key:
|
||||
type: string
|
||||
description: |-
|
||||
The device's ephemeral public key, encoded as unpadded base64.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- transaction_id
|
||||
- key
|
||||
type: object
|
||||
type:
|
||||
|
|
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
description: |-
|
||||
Required when sent as an in-room message. Indicates the
|
||||
`m.key.verification.request` that this message is related to. Note that for
|
||||
encrypted messages, this property should be in the unencrypted portion of the
|
||||
event.
|
||||
properties:
|
||||
rel_type:
|
||||
type: string
|
||||
enum:
|
||||
- m.reference
|
||||
description: |-
|
||||
The relationship type.
|
||||
event_id:
|
||||
type: string
|
||||
description: |-
|
||||
The event ID of the `m.key.verification.request` that this message is
|
||||
related to.
|
||||
type: object
|
||||
type: object
|
||||
title: VerificationRelatesTo
|
|
@ -3,16 +3,16 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Sends the MAC of a device's key to the partner device. Typically sent as a
|
||||
[to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Sends the MAC of a device's key to the partner device.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification process. Must be the same as
|
||||
the one used for the `m.key.verification.start` message.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification process. Must be the same as the one used for the
|
||||
`m.key.verification.start` message.
|
||||
mac:
|
||||
type: object
|
||||
description: |-
|
||||
|
@ -26,8 +26,10 @@ properties:
|
|||
description: |-
|
||||
The MAC of the comma-separated, sorted, list of key IDs given in the `mac`
|
||||
property, encoded as unpadded base64.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- transaction_id
|
||||
- mac
|
||||
- keys
|
||||
type: object
|
||||
|
|
40
data/event-schemas/schema/m.key.verification.ready.yaml
Normal file
40
data/event-schemas/schema/m.key.verification.ready.yaml
Normal file
|
@ -0,0 +1,40 @@
|
|||
---
|
||||
allOf:
|
||||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Accepts a key verification request. Sent in response to an
|
||||
`m.key.verification.request` event.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
from_device:
|
||||
type: string
|
||||
description: |-
|
||||
The device ID which is accepting the request.
|
||||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
Required when sent as a to-device message. The transaction ID of the
|
||||
verification request, as given in the `m.key.verification.request`
|
||||
message.
|
||||
methods:
|
||||
type: array
|
||||
description: |-
|
||||
The verification methods supported by the sender, corresponding to
|
||||
the verification methods indicated in the
|
||||
`m.key.verification.request` message.
|
||||
items:
|
||||
type: string
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- from_device
|
||||
- methods
|
||||
type: object
|
||||
type:
|
||||
enum:
|
||||
- m.key.verification.ready
|
||||
type: string
|
||||
type: object
|
|
@ -3,8 +3,7 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Requests a key verification with another user's devices. Typically sent as a
|
||||
[to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Requests a key verification with another user's devices.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
|
@ -15,8 +14,9 @@ properties:
|
|||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification request. Must be unique
|
||||
with respect to the devices involved.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification request. Must be unique with respect to the devices
|
||||
involved.
|
||||
methods:
|
||||
type: array
|
||||
description: |-
|
||||
|
@ -27,14 +27,13 @@ properties:
|
|||
type: integer
|
||||
format: int64
|
||||
description: |-
|
||||
The POSIX timestamp in milliseconds for when the request was made. If
|
||||
the request is in the future by more than 5 minutes or more than 10
|
||||
minutes in the past, the message should be ignored by the receiver.
|
||||
Required when sent as a to-device message. The POSIX timestamp in
|
||||
milliseconds for when the request was made. If the request is in the
|
||||
future by more than 5 minutes or more than 10 minutes in the past,
|
||||
the message should be ignored by the receiver.
|
||||
required:
|
||||
- from_device
|
||||
- transaction_id
|
||||
- methods
|
||||
- timestamp
|
||||
type: object
|
||||
type:
|
||||
enum:
|
||||
|
|
|
@ -3,7 +3,7 @@ allOf:
|
|||
- $ref: core-event-schema/event.yaml
|
||||
|
||||
description: |-
|
||||
Begins a SAS key verification process using the `m.sas.v1` method. Typically sent as a [to-device](/client-server-api/#send-to-device-messaging) event.
|
||||
Begins a SAS key verification process using the `m.sas.v1` method.
|
||||
properties:
|
||||
content:
|
||||
properties:
|
||||
|
@ -14,10 +14,11 @@ properties:
|
|||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification process. Must be unique
|
||||
with respect to the devices involved. Must be the same as the
|
||||
`transaction_id` given in the `m.key.verification.request`
|
||||
if this process is originating from a request.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification process. Must be unique with respect to the devices
|
||||
involved. Must be the same as the `transaction_id` given in the
|
||||
`m.key.verification.request` if this process is originating from a
|
||||
request.
|
||||
method:
|
||||
type: string
|
||||
enum: ["m.sas.v1"]
|
||||
|
@ -53,9 +54,11 @@ properties:
|
|||
items:
|
||||
type: string
|
||||
enum: ["decimal", "emoji"]
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- from_device
|
||||
- transaction_id
|
||||
- method
|
||||
- key_agreement_protocols
|
||||
- hashes
|
||||
|
|
|
@ -16,10 +16,11 @@ properties:
|
|||
transaction_id:
|
||||
type: string
|
||||
description: |-
|
||||
An opaque identifier for the verification process. Must be unique
|
||||
with respect to the devices involved. Must be the same as the
|
||||
`transaction_id` given in the `m.key.verification.request`
|
||||
if this process is originating from a request.
|
||||
Required when sent as a to-device message. An opaque identifier for
|
||||
the verification process. Must be unique with respect to the devices
|
||||
involved. Must be the same as the `transaction_id` given in the
|
||||
`m.key.verification.request` if this process is originating from a
|
||||
request.
|
||||
method:
|
||||
type: string
|
||||
description: |-
|
||||
|
@ -30,9 +31,11 @@ properties:
|
|||
Optional method to use to verify the other user's key with. Applicable
|
||||
when the `method` chosen only verifies one user's key. This field will
|
||||
never be present if the `method` verifies keys both ways.
|
||||
m.relates_to:
|
||||
allOf:
|
||||
- $ref: m.key.verification.m.relates_to.yaml
|
||||
required:
|
||||
- from_device
|
||||
- transaction_id
|
||||
- method
|
||||
type: object
|
||||
type:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue