Merge remote-tracking branch 'remotes/origin/master'
commit
b53083732b
@ -0,0 +1,8 @@
|
|||||||
|
language: go
|
||||||
|
go:
|
||||||
|
- 1.8
|
||||||
|
|
||||||
|
sudo: false
|
||||||
|
|
||||||
|
script:
|
||||||
|
- ./scripts/test-and-build.sh
|
@ -0,0 +1,52 @@
|
|||||||
|
# Copyright 2017 Travis Ralston
|
||||||
|
#
|
||||||
|
# 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 Client-Server Account Identification API"
|
||||||
|
version: "1.0.0"
|
||||||
|
host: localhost:8008
|
||||||
|
schemes:
|
||||||
|
- https
|
||||||
|
- http
|
||||||
|
basePath: /_matrix/client/%CLIENT_MAJOR_VERSION%
|
||||||
|
produces:
|
||||||
|
- application/json
|
||||||
|
securityDefinitions:
|
||||||
|
$ref: definitions/security.yaml
|
||||||
|
paths:
|
||||||
|
"/account/whoami":
|
||||||
|
get:
|
||||||
|
summary: Gets information about the owner of an access token.
|
||||||
|
description: |-
|
||||||
|
Gets information about the owner of a given access token.
|
||||||
|
security:
|
||||||
|
- accessToken: []
|
||||||
|
parameters: []
|
||||||
|
responses:
|
||||||
|
200:
|
||||||
|
description:
|
||||||
|
The token belongs to a known user.
|
||||||
|
examples:
|
||||||
|
application/json: {
|
||||||
|
"user_id": "@joe:example.org"
|
||||||
|
}
|
||||||
|
schema:
|
||||||
|
type: object
|
||||||
|
required: ["user_id"]
|
||||||
|
properties:
|
||||||
|
user_id:
|
||||||
|
type: string
|
||||||
|
description: The user id that owns the access token.
|
||||||
|
tags:
|
||||||
|
- User data
|
@ -1,25 +1,3 @@
|
|||||||
#! /bin/bash
|
#!/bin/sh
|
||||||
|
|
||||||
set -ex
|
exec ./scripts/test-and-build.sh
|
||||||
|
|
||||||
virtualenv env
|
|
||||||
. env/bin/activate
|
|
||||||
pip install -r scripts/requirements.txt
|
|
||||||
|
|
||||||
# do sanity checks on the examples and swagger
|
|
||||||
(cd event-schemas/ && ./check_examples.py)
|
|
||||||
(cd api && ./check_examples.py)
|
|
||||||
(cd api && npm install && node validator.js -s "client-server")
|
|
||||||
|
|
||||||
: ${GOPATH:=${WORKSPACE}/.gopath}
|
|
||||||
mkdir -p "${GOPATH}"
|
|
||||||
export GOPATH
|
|
||||||
go get github.com/hashicorp/golang-lru
|
|
||||||
go get gopkg.in/fsnotify.v1
|
|
||||||
|
|
||||||
# make sure that the scripts build
|
|
||||||
(cd scripts/continuserv && go build)
|
|
||||||
(cd scripts/speculator && go build)
|
|
||||||
|
|
||||||
# build the spec and collect the supporting docs for matrix.org
|
|
||||||
./scripts/generate-matrix-org-assets
|
|
||||||
|
@ -0,0 +1,29 @@
|
|||||||
|
#! /bin/bash
|
||||||
|
|
||||||
|
set -ex
|
||||||
|
|
||||||
|
cd `dirname $0`/..
|
||||||
|
|
||||||
|
virtualenv env
|
||||||
|
. env/bin/activate
|
||||||
|
pip install -r scripts/requirements.txt
|
||||||
|
|
||||||
|
# do sanity checks on the examples and swagger
|
||||||
|
(cd event-schemas/ && ./check_examples.py)
|
||||||
|
(cd api && ./check_examples.py)
|
||||||
|
(cd api && npm install && node validator.js -s "client-server")
|
||||||
|
|
||||||
|
: ${GOPATH:=${WORKSPACE}/.gopath}
|
||||||
|
mkdir -p "${GOPATH}"
|
||||||
|
export GOPATH
|
||||||
|
go get github.com/hashicorp/golang-lru
|
||||||
|
go get gopkg.in/fsnotify.v1
|
||||||
|
|
||||||
|
# make sure that the scripts build
|
||||||
|
(cd scripts/continuserv && go build)
|
||||||
|
(cd scripts/speculator && go build)
|
||||||
|
|
||||||
|
# build the spec for matrix.org.
|
||||||
|
# (we don't actually use it on travis, but it's still useful to check we
|
||||||
|
# can build it. On Jenkins, this is then used to deploy to matrix.org).
|
||||||
|
./scripts/generate-matrix-org-assets
|
@ -0,0 +1,48 @@
|
|||||||
|
.. Copyright 2017 Kamax.io
|
||||||
|
..
|
||||||
|
.. 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.
|
||||||
|
|
||||||
|
3PID Types
|
||||||
|
----------
|
||||||
|
Third Party Identifiers (3PIDs) represent identifiers on other namespaces that
|
||||||
|
might be associated with a particular person. They comprise a tuple of ``medium``
|
||||||
|
which is a string that identifies the namespace in which the identifier exists,
|
||||||
|
and an ``address``: a string representing the identifier in that namespace. This
|
||||||
|
must be a canonical form of the identifier, *i.e.* if multiple strings could
|
||||||
|
represent the same identifier, only one of these strings must be used in a 3PID
|
||||||
|
address, in a well-defined manner.
|
||||||
|
|
||||||
|
For example, for e-mail, the ``medium`` is 'email' and the ``address`` would be the
|
||||||
|
email address, *e.g.* the string ``bob@example.com``. Since domain resolution is
|
||||||
|
case-insensitive, the email address ``bob@Example.com`` is also has the 3PID address
|
||||||
|
of ``bob@example.com`` (without the capital 'e') rather than ``bob@Example.com``.
|
||||||
|
|
||||||
|
The namespaces defined by this specification are listed below. More namespaces
|
||||||
|
may be defined in future versions of this specification.
|
||||||
|
|
||||||
|
E-Mail
|
||||||
|
~~~~~~
|
||||||
|
Medium: ``email``
|
||||||
|
|
||||||
|
Represents E-Mail addresses. The ``address`` is the raw email address in
|
||||||
|
``user@domain`` form with the domain in lowercase. It must not contain other text
|
||||||
|
such as real name, angle brackets or a mailto: prefix.
|
||||||
|
|
||||||
|
PSTN Phone numbers
|
||||||
|
~~~~~~~~~~~~~~~~~~
|
||||||
|
Medium: ``msisdn``
|
||||||
|
|
||||||
|
Represents telephone numbers on the public switched telephone network. The
|
||||||
|
``address`` is the telephone number represented as a MSISDN (Mobile Station
|
||||||
|
International Subscriber Directory Number) as defined by the E.164 numbering
|
||||||
|
plan. Note that MSISDNs do not include a leading '+'.
|
Loading…
Reference in New Issue