fix(auth): expose trusted upstream mode
This commit is contained in:
@@ -88,3 +88,14 @@ test("configured OIDC initializes login from the literal secret bundle without a
|
||||
rmSync(directory, { recursive: true, force: true });
|
||||
}
|
||||
});
|
||||
|
||||
test("upstream mode advertises its public authentication contract without a local auth provider", async () => {
|
||||
const app = buildApp(loadConfig({ NODE_ENV: "production", AUTH_MODE: "upstream", THOTH_PUBLIC_EXPOSURE: "false" }));
|
||||
try {
|
||||
const response = await app.inject({ method: "GET", url: "/auth/config" });
|
||||
expect(response.statusCode).toBe(200);
|
||||
expect(response.json()).toEqual({ mode: "upstream", localLogin: false, oidcLogin: false });
|
||||
} finally {
|
||||
await app.close();
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user