mirror of
https://github.com/vector-im/element-web.git
synced 2024-11-22 16:18:14 +08:00
491f0cd08a
* Copyright headers 1 * Licence headers 2 * Copyright Headers 3 * Copyright Headers 4 * Copyright Headers 5 * Copyright Headers 6 * Copyright headers 7 * Add copyright headers for html and config file * Replace license files and update package.json * Update with CLA * lint |
||
---|---|---|
.. | ||
res/oauth | ||
index.ts | ||
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.
});