You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
130 lines
4.0 KiB
YAML
130 lines
4.0 KiB
YAML
8 years ago
|
# 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.
|
||
9 years ago
|
swagger: '2.0'
|
||
|
info:
|
||
|
title: "Matrix Identity Service Public Key API"
|
||
|
version: "1.0.0"
|
||
|
host: localhost:8090
|
||
|
schemes:
|
||
|
- https
|
||
8 years ago
|
basePath: /_matrix/identity/api/v1
|
||
6 years ago
|
consumes:
|
||
|
- application/json
|
||
9 years ago
|
produces:
|
||
|
- application/json
|
||
|
paths:
|
||
|
"/pubkey/{keyId}":
|
||
|
get:
|
||
|
summary: Get a public key.
|
||
|
description: |-
|
||
|
Get the public key for the passed key ID.
|
||
7 years ago
|
operationId: getPubKey
|
||
5 years ago
|
deprecated: true
|
||
9 years ago
|
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:
|
||
7 years ago
|
application/json: {
|
||
6 years ago
|
"public_key": "VXuGitF39UH5iRfvbIknlvlAVKgD1BsLDMvBf0pmp7c"
|
||
|
}
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
public_key:
|
||
|
type: string
|
||
6 years ago
|
description: Unpadded Base64 encoded public key.
|
||
|
required: ['public_key']
|
||
|
404:
|
||
|
description:
|
||
|
The public key was not found.
|
||
|
examples:
|
||
|
application/json: {
|
||
|
"errcode": "M_NOT_FOUND",
|
||
|
"error": "The public key was not found"
|
||
|
}
|
||
|
schema:
|
||
|
$ref: "../client-server/definitions/errors/error.yaml"
|
||
9 years ago
|
"/pubkey/isvalid":
|
||
|
get:
|
||
|
summary: Check whether a long-term public key is valid.
|
||
|
description: |-
|
||
6 years ago
|
Check whether a long-term public key is valid. The response should always
|
||
|
be the same, provided the key exists.
|
||
7 years ago
|
operationId: isPubKeyValid
|
||
5 years ago
|
deprecated: true
|
||
9 years ago
|
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:
|
||
7 years ago
|
application/json: {
|
||
6 years ago
|
"valid": true
|
||
|
}
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
valid:
|
||
|
type: boolean
|
||
|
description: Whether the public key is recognised and is currently valid.
|
||
6 years ago
|
required: ['valid']
|
||
9 years ago
|
"/pubkey/ephemeral/isvalid":
|
||
|
get:
|
||
|
summary: Check whether a short-term public key is valid.
|
||
|
description: |-
|
||
|
Check whether a short-term public key is valid.
|
||
7 years ago
|
operationId: isEphemeralPubKeyValid
|
||
5 years ago
|
deprecated: true
|
||
9 years ago
|
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:
|
||
7 years ago
|
application/json: {
|
||
6 years ago
|
"valid": true
|
||
|
}
|
||
9 years ago
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
valid:
|
||
|
type: boolean
|
||
|
description: Whether the public key is recognised and is currently valid.
|
||
6 years ago
|
required: ['valid']
|