From 44a440854f5135ea684110b0e63f208c90095da8 Mon Sep 17 00:00:00 2001 From: Justin Spahr-Summers Date: Mon, 17 Feb 2025 10:34:57 +0000 Subject: [PATCH] Code review comments --- src/client/auth.test.ts | 6 +++--- src/client/auth.ts | 7 ------- 2 files changed, 3 insertions(+), 10 deletions(-) diff --git a/src/client/auth.test.ts b/src/client/auth.test.ts index 6d60806f..c65a5f3a 100644 --- a/src/client/auth.test.ts +++ b/src/client/auth.test.ts @@ -84,8 +84,8 @@ describe("OAuth Authorization", () => { describe("startAuthorization", () => { const validMetadata = { issuer: "https://auth.example.com", - authorization_endpoint: "https://auth.example.com/authorize", - token_endpoint: "https://auth.example.com/token", + authorization_endpoint: "https://auth.example.com/auth", + token_endpoint: "https://auth.example.com/tkn", response_types_supported: ["code"], code_challenge_methods_supported: ["S256"], }; @@ -131,7 +131,7 @@ describe("OAuth Authorization", () => { ); expect(authorizationUrl.toString()).toMatch( - /^https:\/\/auth\.example\.com\/authorize\?/ + /^https:\/\/auth\.example\.com\/auth\?/ ); }); diff --git a/src/client/auth.ts b/src/client/auth.ts index 2c11ea8a..e38b9bfc 100644 --- a/src/client/auth.ts +++ b/src/client/auth.ts @@ -432,13 +432,6 @@ export async function refreshAuthorization( /** * Performs OAuth 2.0 Dynamic Client Registration according to RFC 7591. - * - * @param serverUrl - The base URL of the authorization server - * @param options - Registration options - * @param options.metadata - OAuth server metadata containing the registration endpoint - * @param options.clientMetadata - Client metadata for registration - * @returns The registered client information - * @throws Error if the server doesn't support dynamic registration or if registration fails */ export async function registerClient( serverUrl: string | URL,