Skip to content

Reorganize client authentication section to separate the legacy API and the new OAuth 2.0 API #2141

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

zecakeh
Copy link
Contributor

@zecakeh zecakeh commented May 14, 2025

This is supposed to be a PR on which other PRs that add bits of the OAuth 2.0 API will be based. As such it separates the sub-sections that are specific to the legacy API in its own section, and it adds an empty "OAuth 2.0 API" section.

Since account locking and suspension are authentication API agnostic, this also adds a new "Account moderation" section.

This also splits the "Account registration and management" section and its endpoints to separate them cleanly in the spec, for 2 reasons:

  1. In the OAuth 2.0 spec, account management is associated to MSC2964, which is separate to account registration that was included in MSC4191, so it will allow us to have a similar structure.
  2. This avoids having deactivation show before registration and fixes "Account registration and management" section starts off telling you how to deactivate your account #1073.

The plan for the future is:

  1. Open several PRs based on this one, that should each include a separate section for an MSC from the sub-proposals of MSC3861 in the new "OAuth 2.0 API" section. Of course that means that they will conflict, but merging them should be as easy as putting the separate sections in the proper order.
  2. Once those are merged, open PRs to:
    • Add cross-links between the new sections.
    • Clarify the direct "Client Authentication" sub-sections to make sure that they apply to both authentication APIs.
    • Add more general "Client Authentication" sub-sections to clarify how to do similar things with the 2 authentication APIs.
    • Add introductions to the legacy and OAuth 2.0 API.
    • Check all the spec for mentions to the legacy API in the spec and see if they need to mention a more general section, or if they need an info box saying that they are only supported by the legacy API (e.g. the endpoints that require UIA).

Pull Request Checklist

Preview: https://pr2141--matrix-spec-previews.netlify.app

Since account locking and suspension are authentication API agnostic,
this is a pre-requisite to adding the new OAuth 2.0-based API.

This also splits the endpoints that where all included in the
registration OpenAPI data, to separate them cleanly in the spec, and
avoid having deactivation show before registration.

Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh requested a review from a team as a code owner May 14, 2025 11:05
zecakeh added 2 commits May 14, 2025 13:06
Signed-off-by: Kévin Commaille <[email protected]>
Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh force-pushed the split-account-registration branch from cf45f4d to c68a87c Compare May 24, 2025 11:07
zecakeh added 2 commits May 24, 2025 15:17
Signed-off-by: Kévin Commaille <[email protected]>
@zecakeh zecakeh changed the title Split account registration and management section and definitions Reorganize client authentication section to separate the legacy API and the new OAuth 2.0 API May 24, 2025
@@ -0,0 +1 @@
Add the OAuth 2.0 based authentication API, as per [MSC3861](https://github.com/matrix-org/matrix-spec-proposals/pull/3861) and its sub-proposals.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess is that we will use this changelog for most of the PRs related to the OAuth 2.0 API.

@@ -764,7 +766,7 @@ auth by offering a stage with only the `m.login.dummy` auth type, but they
must still give a 401 response to requests with no auth data.
{{% /boxes/note %}}

#### Example
**Example**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I downgraded this to a non-heading, because I feel like it doesn't need to appear in the ToC.

@@ -1195,7 +1197,7 @@ with just the session ID:
}
```

##### Example
**Example**
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same here, I downgraded this to a non-heading, because I feel like it doesn't need to appear in the ToC.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

"Account registration and management" section starts off telling you how to deactivate your account
1 participant