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.
98 lines
3.2 KiB
YAML
98 lines
3.2 KiB
YAML
6 years ago
|
# Copyright 2018 New Vector 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:
|
||
6 years ago
|
title: "Matrix Identity Service Ephemeral Invitation Signing API"
|
||
6 years ago
|
version: "1.0.0"
|
||
|
host: localhost:8090
|
||
|
schemes:
|
||
|
- https
|
||
|
basePath: /_matrix/identity/api/v1
|
||
6 years ago
|
consumes:
|
||
|
- application/json
|
||
6 years ago
|
produces:
|
||
|
- application/json
|
||
|
paths:
|
||
|
"/sign-ed25519":
|
||
|
post:
|
||
|
summary: Sign invitation details
|
||
|
description: |-
|
||
|
Sign invitation details.
|
||
|
|
||
6 years ago
|
The identity server will look up ``token`` which was stored in a call
|
||
6 years ago
|
to ``store-invite``, and fetch the sender of the invite.
|
||
|
operationId: blindlySignStuff
|
||
5 years ago
|
deprecated: true
|
||
6 years ago
|
parameters:
|
||
|
- in: body
|
||
|
name: body
|
||
|
schema:
|
||
|
type: object
|
||
|
example: {
|
||
6 years ago
|
"mxid": "@foo:bar.com",
|
||
|
"token": "sometoken",
|
||
|
"private_key": "base64encodedkey"
|
||
|
}
|
||
6 years ago
|
properties:
|
||
|
mxid:
|
||
|
type: string
|
||
|
description: The Matrix user ID of the user accepting the invitation.
|
||
|
token:
|
||
|
type: string
|
||
6 years ago
|
description: The token from the call to ``store-invite``.
|
||
6 years ago
|
private_key:
|
||
|
type: string
|
||
|
description: The private key, encoded as `Unpadded base64`_.
|
||
|
required: ["mxid", "token", "private_key"]
|
||
|
responses:
|
||
|
200:
|
||
6 years ago
|
description: The signed JSON of the mxid, sender, and token.
|
||
6 years ago
|
schema:
|
||
|
type: object
|
||
|
properties:
|
||
|
mxid:
|
||
|
type: string
|
||
|
description: The Matrix user ID of the user accepting the invitation.
|
||
|
sender:
|
||
|
type: string
|
||
|
description: The Matrix user ID of the user who sent the invitation.
|
||
|
signatures:
|
||
|
type: object
|
||
|
description: The signature of the mxid, sender, and token.
|
||
6 years ago
|
$ref: "../../schemas/server-signatures.yaml"
|
||
6 years ago
|
token:
|
||
|
type: string
|
||
|
description: The token for the invitation.
|
||
6 years ago
|
required: ['mxid', 'sender', 'signatures', 'token']
|
||
6 years ago
|
examples:
|
||
|
application/json: {
|
||
|
"mxid": "@foo:bar.com",
|
||
|
"sender": "@baz:bar.com",
|
||
|
"signatures": {
|
||
|
"my.id.server": {
|
||
|
"ed25519:0": "def987"
|
||
|
}
|
||
|
},
|
||
|
"token": "abc123"
|
||
|
}
|
||
|
404:
|
||
6 years ago
|
description: The token was not found.
|
||
6 years ago
|
examples:
|
||
6 years ago
|
application/json: {
|
||
6 years ago
|
"errcode": "M_UNRECOGNIZED",
|
||
|
"error": "Didn't recognize token"
|
||
|
}
|
||
6 years ago
|
schema:
|
||
|
$ref: "../client-server/definitions/errors/error.yaml"
|