riot-web/playwright/plugins/oauth_server
David Langley 69ee8fd96a
Change License: AGPL + Element Commercial (#28856)
* Add commercial licence and update config files

* Update license in headers

* Revert "Update license in headers"

This reverts commit 7ed7949485.

* Update only spdx id

* Remove LicenseRef- from package.json

LicenseRef- no longer allowed in npm v3 package.json
This fixes the warning in the logs and failing build check.
2025-01-06 11:18:54 +00:00
..
res/oauth
README.md
index.ts Change License: AGPL + Element Commercial (#28856) 2025-01-06 11:18:54 +00:00

README.md

oauth_server

A very simple OAuth identity provider server.

The following endpoints are exposed:

  • /oauth/auth.html: An OAuth2 authorization endpoint. In a proper OAuth2 system, this would prompt the user to log in; we just give a big "Submit" button (and an auth code that can be changed if we want the next step to fail). It redirects back to the calling application with a "code".

  • /oauth/token: An OAuth2 token endpoint. Receives the code issued by "auth.html" and, if it is valid, exchanges it for an OAuth2 access token.

  • /oauth/userinfo: An OAuth2 userinfo endpoint. Returns details about the owner of the offered access token.

To start the server, do:

cy.task("startOAuthServer").then((port) => {
    // now we can configure Synapse or Element to talk to the OAuth2 server.
});