Skip to content

Commit 1b69ffc

Browse files
authored
Merge branch 'main' into openid-cross-linking
2 parents 109baba + d3cbb2c commit 1b69ffc

6 files changed

Lines changed: 52 additions & 4 deletions

File tree

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Specify `unsigned.prev_sender` in client-formatted events. Contributed by @timedoutuk.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restore the legacy singular anchor for the well-known URI section.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Link to the relevant OAuth 2.0 RFCs for the structure of error responses on the OAuth 2.0 API endpoints.
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Restore the legacy singular anchor for the well-known URI section.

content/client-server-api/_index.md

Lines changed: 38 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,8 +56,9 @@ requirements for server responses.
5656

5757
### Standard error response
5858

59-
Any errors which occur at the Matrix API level MUST return a "standard
60-
error response". This is a JSON object which looks like:
59+
Any errors which occur at the Matrix API level (for requests that are within
60+
scope of these [API Standards](#api-standards)) MUST return a "standard error
61+
response". This is a JSON object which looks like:
6162

6263
```json
6364
{
@@ -415,7 +416,9 @@ valid data was obtained, but no server is available to serve the client.
415416
No further guess should be attempted and the user should make a
416417
conscientious decision what to do next.
417418

418-
### Well-known URIs
419+
### <a id="well-known-uri" /> Well-known URIs
420+
421+
<!-- NB: `#well-known-uri` is linked to from https://www.iana.org/assignments/well-known-uris -->
419422

420423
Matrix facilitates automatic discovery for the Client-Server API base URL and more via the
421424
[RFC 8615](https://datatracker.ietf.org/doc/html/rfc8615) "Well-Known URI" method.
@@ -1860,7 +1863,8 @@ A successful authorisation will have a `code` value, for example:
18601863
https://app.example.com/oauth2-callback#state=ewubooN9weezeewah9fol4oothohroh3&code=iuB7Eiz9heengah1joh2ioy9ahChuP6R
18611864
```
18621865

1863-
A failed authorisation will have the following values:
1866+
A failed authorisation will have the following values as defined by
1867+
[RFC 6749 section 4.1.2.1](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1):
18641868

18651869
- `error`: the error code
18661870
- `error_description`: the error description (optional)
@@ -1891,6 +1895,12 @@ parameters, encoded as `application/x-www-form-urlencoded` in the body:
18911895
The server replies with a JSON object containing the access token, the token
18921896
type, the expiration time, and the refresh token.
18931897

1898+
{{% boxes/note %}}
1899+
Error responses to this request do not follow the Matrix [standard error
1900+
response](#standard-error-response) structure and are instead defined by
1901+
[RFC 6749 section 5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2).
1902+
{{% /boxes/note %}}
1903+
18941904
Sample token request:
18951905

18961906
```nohighlight
@@ -1979,6 +1989,12 @@ containing:
19791989
It is RECOMMENDED that the server provides a `verification_uri_complete` such
19801990
that the user does not need to type in the `user_code`.
19811991

1992+
{{% boxes/note %}}
1993+
Error responses do not follow the Matrix [standard error response](#standard-error-response)
1994+
structure and are instead defined by [RFC 6749 section 5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2),
1995+
as required by [RFC 8628 section 3.2](https://datatracker.ietf.org/doc/html/rfc8628#section-3.2).
1996+
{{% /boxes/note %}}
1997+
19821998
Sample response:
19831999

19842000
```json
@@ -2077,6 +2093,12 @@ The server replies with a JSON object containing the new access token, the token
20772093
type, the expiration time, and a new refresh token, like in the authorisation
20782094
flow.
20792095

2096+
{{% boxes/note %}}
2097+
Error responses to this request do not follow the Matrix [standard error
2098+
response](#standard-error-response) structure and are instead defined by
2099+
[RFC 6749 section 5.2](https://datatracker.ietf.org/doc/html/rfc6749#section-5.2).
2100+
{{% /boxes/note %}}
2101+
20802102
#### Server metadata discovery
20812103

20822104
{{% http-api spec="client-server" api="oauth_server_metadata" %}}
@@ -2239,6 +2261,12 @@ Upon successful registration, the server replies with an `HTTP 201 Created`
22392261
response, with a JSON object containing the allocated `client_id` and all the
22402262
registered metadata values.
22412263

2264+
{{% boxes/note %}}
2265+
Error responses to this request do not follow the Matrix [standard error
2266+
response](#standard-error-response) structure and are instead defined by
2267+
[RFC 7591 section 3.2.2](https://datatracker.ietf.org/doc/html/rfc7591#section-3.2.2).
2268+
{{% /boxes/note %}}
2269+
22422270
With the registration request above, the server might reply with:
22432271

22442272
```json
@@ -2547,6 +2575,12 @@ The server SHOULD return one of the following responses:
25472575
- For other errors, the server returns a `400 Bad Request` response with error
25482576
details
25492577

2578+
{{% boxes/note %}}
2579+
Error responses to this request do not follow the Matrix [standard error
2580+
response](#standard-error-response) structure and are instead defined by
2581+
[RFC 7009 section 2.2.1](https://datatracker.ietf.org/doc/html/rfc7009#section-2.2.1).
2582+
{{% /boxes/note %}}
2583+
25502584
#### User registration
25512585

25522586
Clients can signal to the server that the user desires to register a new account

data/api/client-server/definitions/client_event_without_room_id.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,16 @@ properties:
118118
this.
119119
title: EventContent
120120
type: object
121+
prev_sender:
122+
description: |
123+
The user ID of the sender of the previous state event that was replaced
124+
by this event. This field is generated by the local homeserver, and is
125+
only returned if the event is a state event.
126+
Unlike `prev_content`, this field is included regardless of history visibility.
127+
type: string
128+
format: mx-user-id
129+
pattern: "^@"
130+
x-addedInMatrixVersion: "1.20"
121131
replaces_state:
122132
description: |
123133
The event ID of the state event replaced by this event. This field is generated

0 commit comments

Comments
 (0)