Skip to content

Commit be83c92

Browse files
committed
Update AuthorizationHelpers.cs
1 parent 1078ad0 commit be83c92

1 file changed

Lines changed: 2 additions & 3 deletions

File tree

src/ModelContextProtocol.Core/Authentication/AuthorizationHelpers.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -223,14 +223,13 @@ public async Task<IReadOnlyList<Uri>> GetAvailableAuthorizationServersAsync(
223223

224224
try
225225
{
226-
// Extract resource metadata behind the scenes
227226
var metadata = await ExtractProtectedResourceMetadata(response, serverUrl, cancellationToken);
228-
return metadata.AuthorizationServers ?? new List<Uri>();
227+
return metadata.AuthorizationServers ?? [];
229228
}
230229
catch (Exception ex)
231230
{
232231
_logger.LogError(ex, "Failed to get available authorization servers");
233-
return new List<Uri>();
232+
return [];
234233
}
235234
}
236235
}

0 commit comments

Comments
 (0)