All of the mid-session and step-up auth work

This commit is contained in:
Bob Dickinson 2026-07-02 16:35:31 -07:00
commit 562bdd00f1

View file

@ -0,0 +1,18 @@
import { describe, it, expect } from "vitest";
import type { PendingReauth } from "./pendingReauth.js";
describe("PendingReauth", () => {
it("carries step-up source through deferred resume", () => {
const pending: PendingReauth = {
serverId: "srv-1",
challenge: {
reason: "insufficient_scope",
requiredScopes: ["weather:read"],
},
authorizationUrl: new URL("https://as.example/authorize"),
authKind: "step_up",
source: "tool",
};
expect(pending.source).toBe("tool");
});
});