oauth: add tenant suffix to oauth flow (#1096)
This commit is contained in:
parent
f2ed4ef3b9
commit
695972a404
1 changed files with 72 additions and 9 deletions
|
|
@ -681,7 +681,7 @@ describe("AuthDebugger", () => {
|
|||
const updateAuthState = jest.fn();
|
||||
const mockResourceMetadata = {
|
||||
resource: "https://example.com/mcp",
|
||||
authorization_servers: ["https://custom-auth.example.com"],
|
||||
authorization_servers: ["https://custom-auth.example.com/mcp/tenant"],
|
||||
bearer_methods_supported: ["header", "body"],
|
||||
resource_documentation: "https://example.com/mcp/docs",
|
||||
resource_policy_uri: "https://example.com/mcp/policy",
|
||||
|
|
@ -733,11 +733,17 @@ describe("AuthDebugger", () => {
|
|||
expect(updateAuthState).toHaveBeenCalledWith(
|
||||
expect.objectContaining({
|
||||
resourceMetadata: mockResourceMetadata,
|
||||
authServerUrl: new URL("https://custom-auth.example.com"),
|
||||
authServerUrl: new URL(
|
||||
"https://custom-auth.example.com/mcp/tenant",
|
||||
),
|
||||
oauthStep: "client_registration",
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
expect(mockDiscoverAuthorizationServerMetadata).toHaveBeenCalledWith(
|
||||
new URL("https://custom-auth.example.com/mcp/tenant"),
|
||||
);
|
||||
});
|
||||
|
||||
it("should handle protected resource metadata fetch failure gracefully", async () => {
|
||||
|
|
|
|||
Loading…
Reference in a new issue