- Add account, JWT session, revocation, cookie and bearer handling. - Protect server surfaces while preserving public health, manifest and disabled mode. - Add SQLite migration and focused server regression coverage.
17 lines
627 B
TypeScript
17 lines
627 B
TypeScript
import { redactAuthRequestBody } from "../src/interceptors/logging.interceptor";
|
|
|
|
describe("redactAuthRequestBody", () => {
|
|
it("redacts login passwords on local and API-prefixed route paths", () => {
|
|
const body = { username: "operator", password: "synthetic-secret" };
|
|
expect(redactAuthRequestBody("/auth/login", body)).toEqual({
|
|
username: "operator",
|
|
password: "[REDACTED]",
|
|
});
|
|
expect(redactAuthRequestBody("/api/v1/auth/login", body)).toEqual({
|
|
username: "operator",
|
|
password: "[REDACTED]",
|
|
});
|
|
expect(redactAuthRequestBody("/api/v1/scenarios", body)).toBe(body);
|
|
});
|
|
});
|