mirror of
https://github.com/matrix-org/matrix-spec
synced 2026-03-16 08:24:09 +01:00
Deduplicate signed property of third party invite
Signed-off-by: Kévin Commaille <zecakeh@tedomum.fr>
This commit is contained in:
parent
1f995a0e78
commit
d501212025
|
|
@ -82,45 +82,7 @@ paths:
|
||||||
third-party identifier.
|
third-party identifier.
|
||||||
example: alice
|
example: alice
|
||||||
signed:
|
signed:
|
||||||
type: object
|
$ref: ../../event-schemas/schema/components/signed_third_party_invite.yaml
|
||||||
description: |-
|
|
||||||
A block of content which has been signed, which servers can use to
|
|
||||||
verify the event.
|
|
||||||
title: Invite Signatures
|
|
||||||
properties:
|
|
||||||
signatures:
|
|
||||||
type: object
|
|
||||||
title: Signatures
|
|
||||||
additionalProperties:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
description: |-
|
|
||||||
The server signatures for this event.
|
|
||||||
|
|
||||||
The signature is calculated using the process
|
|
||||||
described at [Signing JSON](/appendices/#signing-json).
|
|
||||||
example:
|
|
||||||
magic.forest:
|
|
||||||
ed25519:3: fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg
|
|
||||||
mxid:
|
|
||||||
type: string
|
|
||||||
description: The invited matrix user ID
|
|
||||||
example: "@alice:localhost"
|
|
||||||
token:
|
|
||||||
type: string
|
|
||||||
description: The token used to verify the event
|
|
||||||
example: abc123
|
|
||||||
required:
|
|
||||||
- signatures
|
|
||||||
- mxid
|
|
||||||
- token
|
|
||||||
example:
|
|
||||||
mxid: "@alice:localhost"
|
|
||||||
token: abc123
|
|
||||||
signatures:
|
|
||||||
magic.forest:
|
|
||||||
ed25519:3: fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg
|
|
||||||
required:
|
required:
|
||||||
- display_name
|
- display_name
|
||||||
- signed
|
- signed
|
||||||
|
|
@ -246,50 +208,8 @@ paths:
|
||||||
type: string
|
type: string
|
||||||
description: The user ID that sent the invite.
|
description: The user ID that sent the invite.
|
||||||
example: "@bob:matrix.org"
|
example: "@bob:matrix.org"
|
||||||
# TODO (TravisR): Make this reusable when doing IS spec changes
|
|
||||||
# also make sure it isn't lying about anything, like the key version
|
|
||||||
signed:
|
signed:
|
||||||
type: object
|
$ref: ../../event-schemas/schema/components/signed_third_party_invite.yaml
|
||||||
title: Identity Server Signatures
|
|
||||||
description: |-
|
|
||||||
Signature from the identity server using a long-term private
|
|
||||||
key.
|
|
||||||
properties:
|
|
||||||
mxid:
|
|
||||||
type: string
|
|
||||||
description: |-
|
|
||||||
The user ID that has been bound to the third-party
|
|
||||||
identifier.
|
|
||||||
example: "@alice:matrix.org"
|
|
||||||
token:
|
|
||||||
type: string
|
|
||||||
# TODO: What is this actually?
|
|
||||||
description: A token.
|
|
||||||
example: Hello World
|
|
||||||
signatures:
|
|
||||||
type: object
|
|
||||||
title: Identity Server Signature
|
|
||||||
description: |-
|
|
||||||
The signature from the identity server. The `string` key
|
|
||||||
is the identity server's domain name, such as vector.im
|
|
||||||
additionalProperties:
|
|
||||||
type: object
|
|
||||||
title: Identity Server Domain Signature
|
|
||||||
description: The signature for the identity server.
|
|
||||||
properties:
|
|
||||||
ed25519:0:
|
|
||||||
type: string
|
|
||||||
description: The signature.
|
|
||||||
example: SomeSignatureGoesHere
|
|
||||||
required:
|
|
||||||
- ed25519:0
|
|
||||||
example:
|
|
||||||
vector.im:
|
|
||||||
ed25519:0: SomeSignatureGoesHere
|
|
||||||
required:
|
|
||||||
- mxid
|
|
||||||
- token
|
|
||||||
- signatures
|
|
||||||
required:
|
required:
|
||||||
- medium
|
- medium
|
||||||
- address
|
- address
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,45 @@
|
||||||
|
title: SignedThirdPartyInvite
|
||||||
|
description: |-
|
||||||
|
A block of content which has been signed by the identity server, which
|
||||||
|
homeservers can use to verify the event. Clients should ignore this.
|
||||||
|
type: object
|
||||||
|
properties:
|
||||||
|
mxid:
|
||||||
|
description: |-
|
||||||
|
The user ID that has been bound to the third-party identifier.
|
||||||
|
type: string
|
||||||
|
format: mx-user-id
|
||||||
|
pattern: "^@"
|
||||||
|
example: "@alice:example.org"
|
||||||
|
signatures:
|
||||||
|
title: IdentityServerSignatures
|
||||||
|
description: |-
|
||||||
|
The identity server signatures for this block. This is a map of identity
|
||||||
|
server name to signing key identifier to base64-encoded signature.
|
||||||
|
|
||||||
|
The signatures are calculated using the process described at
|
||||||
|
[Signing JSON](/appendices/#signing-json).
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: object
|
||||||
|
additionalProperties:
|
||||||
|
type: string
|
||||||
|
example: {
|
||||||
|
"magic.forest": {
|
||||||
|
"ed25519:3": "fQpGIW1Snz+pwLZu6sTy2aHy/DYWWTspTJRPyNp0PKkymfIsNffysMl6ObMMFdIJhk6g6pwlIqZ54rxo8SLmAg"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
token:
|
||||||
|
description: |-
|
||||||
|
The token generated by the identity server at the
|
||||||
|
[`/store_invite`](/identity-service-api/#post_matrixidentityv2store-invite)
|
||||||
|
endpoint.
|
||||||
|
|
||||||
|
It matches the `state_key` of the corresponding [`m.room.third_party_invite`](/client-server-api/#mroomthird_party_invite)
|
||||||
|
event.
|
||||||
|
type: string
|
||||||
|
example: "abc123"
|
||||||
|
required:
|
||||||
|
- mxid
|
||||||
|
- signatures
|
||||||
|
- token
|
||||||
|
|
@ -98,46 +98,23 @@ properties:
|
||||||
the potential for spam and abuse. Hiding the reason behind a button or other component is
|
the potential for spam and abuse. Hiding the reason behind a button or other component is
|
||||||
recommended.
|
recommended.
|
||||||
third_party_invite:
|
third_party_invite:
|
||||||
|
title: ThirdPartyInvite
|
||||||
|
decription: |-
|
||||||
|
A third-party invite, if this `m.room.member` is the successor to an
|
||||||
|
[`m.room.third_party_invite`](/client-server-api/#mroomthird_party_invite)
|
||||||
|
event.
|
||||||
|
type: object
|
||||||
properties:
|
properties:
|
||||||
display_name:
|
display_name:
|
||||||
description: |-
|
description: |-
|
||||||
A name which can be displayed to represent the user instead of
|
A name which can be displayed to represent the user instead of their
|
||||||
their third-party identifier
|
third-party identifier
|
||||||
type: string
|
type: string
|
||||||
signed:
|
signed:
|
||||||
description: |-
|
$ref: components/signed_third_party_invite.yaml
|
||||||
A block of content which has been signed, which servers can use to verify the event.
|
|
||||||
Clients should ignore this.
|
|
||||||
properties:
|
|
||||||
mxid:
|
|
||||||
description: |-
|
|
||||||
The invited matrix user ID. Must be equal to the user_id property of
|
|
||||||
the event.
|
|
||||||
type: string
|
|
||||||
signatures:
|
|
||||||
description: |-
|
|
||||||
A single signature from the verifying server, in the format specified by the
|
|
||||||
Signing Events section of the server-server API.
|
|
||||||
title: Signatures
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: object
|
|
||||||
additionalProperties:
|
|
||||||
type: string
|
|
||||||
token:
|
|
||||||
description: The token property of the containing third_party_invite object.
|
|
||||||
type: string
|
|
||||||
required:
|
|
||||||
- mxid
|
|
||||||
- signatures
|
|
||||||
- token
|
|
||||||
title: signed
|
|
||||||
type: object
|
|
||||||
required:
|
required:
|
||||||
- display_name
|
- display_name
|
||||||
- signed
|
- signed
|
||||||
title: Invite
|
|
||||||
type: object
|
|
||||||
required:
|
required:
|
||||||
- membership
|
- membership
|
||||||
title: EventContent
|
title: EventContent
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue