mirror of
https://github.com/ether/etherpad-lite.git
synced 2025-05-10 17:22:00 -04:00
Feat/oauth2 (#6281): Added oauth to API paths
* Added oauth provider. * Fixed provider. * Added auth flow. * Fixed auth flow and added scaffolding vite config. * Added working oauth2. * Fixed dockerfile. * Adapted run.sh script * Moved api tests to oauth2. * Updated security schemes. * Removed api key from existance. * Fixed installation * Added missing issuer in config. * Fixed dev dependencies. * Updated lock file.
This commit is contained in:
parent
562177022f
commit
fb56809e55
44 changed files with 1782 additions and 237 deletions
|
@ -7,13 +7,12 @@ const common = require('./common');
|
|||
const host = `http://${settings.ip}:${settings.port}`;
|
||||
const froth = require('mocha-froth');
|
||||
const axios = require('axios');
|
||||
const apiKey = common.apiKey;
|
||||
const apiVersion = 1;
|
||||
const testPadId = `TEST_fuzz${makeid()}`;
|
||||
|
||||
const endPoint = function (point: string, version?:number) {
|
||||
version = version || apiVersion;
|
||||
return `/api/${version}/${point}?apikey=${apiKey}`;
|
||||
return `/api/${version}/${point}}`;
|
||||
};
|
||||
|
||||
console.log('Testing against padID', testPadId);
|
||||
|
@ -29,7 +28,12 @@ setTimeout(() => {
|
|||
}, 5000); // wait 5 seconds
|
||||
|
||||
async function runTest(number: number) {
|
||||
await axios.get(`${host + endPoint('createPad')}&padID=${testPadId}`)
|
||||
await axios
|
||||
.get(`${host + endPoint('createPad')}?padID=${testPadId}`, {
|
||||
headers: {
|
||||
Authorization: await common.generateJWTToken(),
|
||||
}
|
||||
})
|
||||
.then(() => {
|
||||
const req = axios.post(`${host}/p/${testPadId}/import`)
|
||||
.then(() => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue