mirror of
https://github.com/matrix-org/matrix-spec
synced 2025-12-31 13:08:38 +01:00
This adds several diagrams to the Client-Server API about how invites are handled, including what the server is expected to do. This helps implementors know what they are supposed to do in the common cases, and infer where needed to get the more complex cases correct. Although lacking in some areas, this is how third party invites work today. A link to the now-improved client-server documentation for third party invites has been added to the server-server specification. The existing server-server specification needed no further changes on the subject. Fixes https://github.com/matrix-org/matrix-doc/issues/1366
111 lines
3.4 KiB
YAML
111 lines
3.4 KiB
YAML
# Copyright 2016 OpenMarket Ltd
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
swagger: '2.0'
|
|
info:
|
|
title: "Matrix Identity Service Public Key API"
|
|
version: "1.0.0"
|
|
host: localhost:8090
|
|
schemes:
|
|
- https
|
|
- http
|
|
basePath: /_matrix/identity/api/v1
|
|
produces:
|
|
- application/json
|
|
paths:
|
|
"/pubkey/{keyId}":
|
|
get:
|
|
summary: Get a public key.
|
|
description: |-
|
|
Get the public key for the passed key ID.
|
|
operationId: getPubKey
|
|
parameters:
|
|
- in: path
|
|
type: string
|
|
name: keyId
|
|
required: true
|
|
description: |-
|
|
The ID of the key. This should take the form algorithm:identifier
|
|
where algorithm identifies the signing algorithm, and the identifier
|
|
is an opaque string.
|
|
x-example: "ed25519:0"
|
|
responses:
|
|
200:
|
|
description:
|
|
The public key exists.
|
|
examples:
|
|
application/json: {
|
|
"public_key": "VXuGitF39UH5iRfvbIknlvlAVKgD1BsLDMvBf0pmp7c"
|
|
}
|
|
schema:
|
|
type: object
|
|
properties:
|
|
public_key:
|
|
type: string
|
|
"/pubkey/isvalid":
|
|
get:
|
|
summary: Check whether a long-term public key is valid.
|
|
description: |-
|
|
Check whether a long-term public key is valid. The request must be idempotent.
|
|
operationId: isPubKeyValid
|
|
parameters:
|
|
- in: query
|
|
type: string
|
|
name: public_key
|
|
required: true
|
|
description: |-
|
|
The unpadded base64-encoded public key to check.
|
|
x-example: "VXuGitF39UH5iRfvbIknlvlAVKgD1BsLDMvBf0pmp7c"
|
|
responses:
|
|
200:
|
|
description:
|
|
The validity of the public key.
|
|
examples:
|
|
application/json: {
|
|
"valid": true
|
|
}
|
|
schema:
|
|
type: object
|
|
properties:
|
|
valid:
|
|
type: boolean
|
|
description: Whether the public key is recognised and is currently valid.
|
|
"/pubkey/ephemeral/isvalid":
|
|
get:
|
|
summary: Check whether a short-term public key is valid.
|
|
description: |-
|
|
Check whether a short-term public key is valid.
|
|
operationId: isEphemeralPubKeyValid
|
|
parameters:
|
|
- in: query
|
|
type: string
|
|
name: public_key
|
|
required: true
|
|
description: |-
|
|
The unpadded base64-encoded public key to check.
|
|
x-example: "VXuGitF39UH5iRfvbIknlvlAVKgD1BsLDMvBf0pmp7c"
|
|
responses:
|
|
200:
|
|
description:
|
|
The validity of the public key.
|
|
examples:
|
|
application/json: {
|
|
"valid": true
|
|
}
|
|
schema:
|
|
type: object
|
|
properties:
|
|
valid:
|
|
type: boolean
|
|
description: Whether the public key is recognised and is currently valid.
|