Change ProtectedResourceMetadata URI properties to strings and build resource strings directly (#1264)

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: halter73 <54385+halter73@users.noreply.github.com>
Co-authored-by: Stephen Halter <halter73@gmail.com>
This commit is contained in:
Copilot 2026-02-12 22:28:43 -05:00 • committed by GitHub
commit dbf91bcb1a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -16,10 +16,11 @@ public sealed class Program
private static readonly string _clientMetadataDocumentUrl = $"{_url}/client-metadata/cimd-client.json";
// Port 5000 is used by tests and port 7071 is used by the ProtectedMcpServer sample
private static readonly string[] ValidResources = [
"http://localhost:5000/",
// Per MCP spec, URIs should not have trailing slashes unless semantically significant
public string[] ValidResources { get; set; } = [
"http://localhost:5000",
"http://localhost:5000/mcp",
"http://localhost:7071/"
"http://localhost:7071"
];
private readonly ConcurrentDictionary<string, AuthorizationCodeInfo> _authCodes = new();