Authorization Support (Using ASP.NET Core Native AuthN/AuthZ Integration) (#377)

This commit is contained in:
Den Delimarsky 🌺 2025-07-03 14:39:28 -07:00 • committed by GitHub
commit cdf88e7f5d
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -3,6 +3,7 @@ using ModelContextProtocol.AspNetCore.Tests.Utils;
using ModelContextProtocol.Client;
using ModelContextProtocol.Tests.Utils;
using ModelContextProtocol.TestSseServer;
using System.Net;
namespace ModelContextProtocol.AspNetCore.Tests;
@ -19,7 +20,7 @@ public class SseServerIntegrationTestFixture : IAsyncDisposable
private SseClientTransportOptions DefaultTransportOptions { get; set; } = new()
{
Endpoint = new("http://localhost/"),
Endpoint = new("http://localhost:5000/"),
};
public SseServerIntegrationTestFixture()
@ -28,14 +29,14 @@ public class SseServerIntegrationTestFixture : IAsyncDisposable
{
ConnectCallback = (context, token) =>
{
var connection = _inMemoryTransport.CreateConnection();
var connection = _inMemoryTransport.CreateConnection(new DnsEndPoint("localhost", 5000));
return new(connection.ClientStream);
},
};
HttpClient = new HttpClient(socketsHttpHandler)
{
BaseAddress = new("http://localhost/"),
BaseAddress = new("http://localhost:5000/"),
};
_serverTask = Program.MainAsync([], new XunitLoggerProvider(_delegatingTestOutputHelper), _inMemoryTransport, _stopCts.Token);