Projects from the front end
auth.api.getAllProjectsPublications({ query: { types: "Project" } })Expected: 200 with the projects: the Gateway lets the plug-in's origin through (CORS)
auth.api.getAllProjectsPublications({ query: { types: "Project" } })Expected: 200 with the projects: the Gateway lets the plug-in's origin through (CORS)
auth.fetchBackend("/api/projects") → gateway.forRequest(req).api.getAllProjectsPublications()Expected: 200 with the projects, and no cookies of the portal received by the back end
fetch("/api/projects") — plain fetch, no AuthorizationExpected: 401 from the back-end helper itself, the Gateway is not called
auth.fetch("/v2/users")Expected: 403 from the Gateway: the scope of the plug-in has only GET /v2/projects(/.*)?
auth.fetch("/v2/projects/labs-test-plugin-no-such-project", { method: "DELETE" })Expected: 403 from the Gateway: any DELETE is closed for every plug-in; nothing reaches the portal
auth.fetch("/v1/projects")Expected: 403 from the Gateway: the whole API v1 is closed for every plug-in
auth.fetch("/v2/projects/..%2fusers")Expected: 403 or 400 from the Gateway: decoded and normalized, the path is /v2/users, outside the scope
auth.fetch("/v2/projects/%2e%2e%2fusers")Expected: 403 or 400 from the Gateway, as above
auth.fetch("/V2/USERS")Expected: 403 from the Gateway: paths are compared ignoring case, as IIS treats them
auth.fetch("/v2/projects", { method: "POST", ... })Expected: 403 from the Gateway: the scope allows only GET; no project is created
auth.fetch("/v2/projects", { headers: { "X-Labs-Test": "1" } })Expected: PluginAuthError network: the CORS preflight fails, the request never leaves the browser
auth.fetchBackend("/api/broken-token") — the back end sends a token the Gateway does not knowExpected: 401 after one token refresh and one repeat (the refresh waits until 10 s have passed since the previous token)
auth.fetchBackend("/api/burst") — 40 parallel requests from the back endExpected: 200 with the statuses the back end got: some 429 with Retry-After (limit of 20 concurrent requests)
auth.fetchBackend("/api/burst?relay=1") — the back end passes the first 429 onExpected: 429 after the library waited Retry-After and repeated the call twice (each repeat bursts again)
auth.getToken()Expected: a token (only its length is shown). After an auth_error this is the "try again": the library asks the portal anew
Nothing yet.