feat: support oidc discovery in client sdk (#652)
Co-authored-by: Paul Carleton <paulc@anthropic.com> Co-authored-by: Claude <noreply@anthropic.com>
This commit is contained in:
parent
62c608d8ce
commit
bb7cccc3ba
1 changed files with 486 additions and 47 deletions
|
|
@ -352,6 +352,11 @@ describe("SSEClientTransport", () => {
|
|||
});
|
||||
|
||||
describe("auth handling", () => {
|
||||
const authServerMetadataUrls = [
|
||||
"/.well-known/oauth-authorization-server",
|
||||
"/.well-known/openid-configuration",
|
||||
];
|
||||
|
||||
let mockAuthProvider: jest.Mocked<OAuthClientProvider>;
|
||||
|
||||
beforeEach(() => {
|
||||
|
|
@ -608,7 +613,7 @@ describe("SSEClientTransport", () => {
|
|||
authServer.close();
|
||||
|
||||
authServer = createServer((req, res) => {
|
||||
if (req.url === "/.well-known/oauth-authorization-server") {
|
||||
if (req.url && authServerMetadataUrls.includes(req.url)) {
|
||||
res.writeHead(404).end();
|
||||
return;
|
||||
}
|
||||
|
|
@ -730,7 +735,7 @@ describe("SSEClientTransport", () => {
|
|||
authServer.close();
|
||||
|
||||
authServer = createServer((req, res) => {
|
||||
if (req.url === "/.well-known/oauth-authorization-server") {
|
||||
if (req.url && authServerMetadataUrls.includes(req.url)) {
|
||||
res.writeHead(404).end();
|
||||
return;
|
||||
}
|
||||
|
|
@ -875,7 +880,7 @@ describe("SSEClientTransport", () => {
|
|||
authServer.close();
|
||||
|
||||
authServer = createServer((req, res) => {
|
||||
if (req.url === "/.well-known/oauth-authorization-server") {
|
||||
if (req.url && authServerMetadataUrls.includes(req.url)) {
|
||||
res.writeHead(404).end();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue