Add security definitions to hs->as endpoints
This commit is contained in:
parent
fa96d8629b
commit
f01cfa2c7b
5 changed files with 42 additions and 0 deletions
18
api/application-service/definitions/security.yaml
Normal file
18
api/application-service/definitions/security.yaml
Normal file
|
@ -0,0 +1,18 @@
|
|||
# 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.
|
||||
homeserverAccessToken:
|
||||
type: apiKey
|
||||
description: The ``hs_token`` provided by the application service's registration.
|
||||
name: access_token
|
||||
in: query
|
|
@ -24,6 +24,8 @@ consumes:
|
|||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
paths:
|
||||
"/_matrix/app/unstable/thirdparty/protocol/{protocol}":
|
||||
get:
|
||||
|
@ -33,6 +35,8 @@ paths:
|
|||
with specific information about the various third party networks that
|
||||
an application service supports.
|
||||
operationId: getProtocolMetadata
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: protocol
|
||||
|
@ -80,6 +84,8 @@ paths:
|
|||
User ID linked to a user on the third party network, given a set of
|
||||
user parameters.
|
||||
operationId: queryUserByProtocol
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: protocol
|
||||
|
@ -131,6 +137,8 @@ paths:
|
|||
description: |-
|
||||
Retrieve a list of Matrix portal rooms that lead to the matched third party location.
|
||||
operationId: queryLocationByProtocol
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: protocol
|
||||
|
@ -183,6 +191,8 @@ paths:
|
|||
Retrieve an array of third party network locations from a Matrix room
|
||||
alias.
|
||||
operationId: queryLocationByAlias
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: query
|
||||
name: alias
|
||||
|
@ -227,6 +237,8 @@ paths:
|
|||
description: |-
|
||||
Retrieve an array of third party users from a Matrix User ID.
|
||||
operationId: queryUserByID
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: query
|
||||
name: userid
|
||||
|
|
|
@ -25,6 +25,8 @@ consumes:
|
|||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
paths:
|
||||
"/rooms/{roomAlias}":
|
||||
get:
|
||||
|
@ -36,6 +38,8 @@ paths:
|
|||
homeserver will send this request when it receives a request to join a
|
||||
room alias within the application service's namespace.
|
||||
operationId: queryRoomByAlias
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: roomAlias
|
||||
|
|
|
@ -25,6 +25,8 @@ consumes:
|
|||
- application/json
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
paths:
|
||||
"/users/{userId}":
|
||||
get:
|
||||
|
@ -36,6 +38,8 @@ paths:
|
|||
send this request when it receives an event for an unknown user ID in
|
||||
the application service's namespace, such as a room invite.
|
||||
operationId: queryUserById
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: userId
|
||||
|
|
|
@ -23,6 +23,8 @@ schemes:
|
|||
basePath: "/"
|
||||
produces:
|
||||
- application/json
|
||||
securityDefinitions:
|
||||
$ref: definitions/security.yaml
|
||||
paths:
|
||||
"/transactions/{txnId}":
|
||||
put:
|
||||
|
@ -35,6 +37,8 @@ paths:
|
|||
from message events via the presence of a ``state_key``, rather than
|
||||
via the event type.
|
||||
operationId: sendTransaction
|
||||
security:
|
||||
- homeserverAccessToken: []
|
||||
parameters:
|
||||
- in: path
|
||||
name: txnId
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue