@@ -174,7 +174,7 @@ public static Task<AuthorizationServerMetadata> DiscoverAuthorizationServerMetad
174174 /// <param name="clientMetadata">The client metadata for registration.</param>
175175 /// <returns>A <see cref="Task"/> that represents the asynchronous operation. The task result contains the client registration response.</returns>
176176 /// <exception cref="InvalidOperationException">Thrown when the authorization server does not support dynamic client registration.</exception>
177- public static async Task < ClientRegistrationResponse > RegisterClientAsync (
177+ public static async Task < ClientRegistration > RegisterClientAsync (
178178 AuthorizationServerMetadata metadata ,
179179 ClientMetadata clientMetadata )
180180 {
@@ -198,7 +198,7 @@ public static async Task<ClientRegistrationResponse> RegisterClientAsync(
198198 var contentStream = await response . Content . ReadAsStreamAsync ( ) ;
199199 using var reader = new StreamReader ( contentStream ) ;
200200 var json = await reader . ReadToEndAsync ( ) ;
201- var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . ClientRegistrationResponse ) ;
201+ var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . ClientRegistration ) ;
202202
203203 if ( result == null )
204204 {
@@ -288,7 +288,7 @@ public static string CreateAuthorizationUrl(
288288 /// <param name="code">The authorization code received from the authorization server.</param>
289289 /// <param name="codeVerifier">The code verifier for PKCE.</param>
290290 /// <returns>A <see cref="Task"/> that represents the asynchronous operation. The task result contains the token response.</returns>
291- public static async Task < TokenResponse > ExchangeCodeForTokensAsync (
291+ public static async Task < Token > ExchangeCodeForTokensAsync (
292292 AuthorizationServerMetadata metadata ,
293293 string clientId ,
294294 string ? clientSecret ,
@@ -330,7 +330,7 @@ public static async Task<TokenResponse> ExchangeCodeForTokensAsync(
330330 var contentStream = await response . Content . ReadAsStreamAsync ( ) ;
331331 using var reader = new StreamReader ( contentStream ) ;
332332 var json = await reader . ReadToEndAsync ( ) ;
333- var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . TokenResponse ) ;
333+ var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . Token ) ;
334334
335335 if ( result == null )
336336 {
@@ -348,7 +348,7 @@ public static async Task<TokenResponse> ExchangeCodeForTokensAsync(
348348 /// <param name="clientSecret">The client secret.</param>
349349 /// <param name="refreshToken">The refresh token.</param>
350350 /// <returns>A <see cref="Task"/> that represents the asynchronous operation. The task result contains the token response.</returns>
351- public static async Task < TokenResponse > RefreshTokenAsync (
351+ public static async Task < Token > RefreshTokenAsync (
352352 AuthorizationServerMetadata metadata ,
353353 string clientId ,
354354 string ? clientSecret ,
@@ -384,7 +384,7 @@ public static async Task<TokenResponse> RefreshTokenAsync(
384384 var contentStream = await response . Content . ReadAsStreamAsync ( ) ;
385385 using var reader = new StreamReader ( contentStream ) ;
386386 var json = await reader . ReadToEndAsync ( ) ;
387- var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . TokenResponse ) ;
387+ var result = JsonSerializer . Deserialize ( json , McpJsonUtilities . JsonContext . Default . Token ) ;
388388
389389 if ( result == null )
390390 {
0 commit comments