Handle Authentication and Authorization in xAiMcpServer ...
This commit is contained in:
@@ -6,6 +6,7 @@ using Microsoft.AspNetCore.Builder;
|
||||
using Microsoft.AspNetCore.HttpOverrides;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using xAiMcpServer.Tools;
|
||||
|
||||
namespace xAiMcpServer.DI
|
||||
{
|
||||
@@ -82,5 +83,15 @@ namespace xAiMcpServer.DI
|
||||
// ref: https://github.com/aspnet/Docs/issues/2384
|
||||
source.UseForwardedHeaders(forwardOptions);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Register Tools which required Dependency Injection Services ...
|
||||
/// </summary>
|
||||
/// <param name="source"></param>
|
||||
public static void AddXAiMcpTools(this IServiceCollection source)
|
||||
{
|
||||
//
|
||||
source.AddScoped<XUserTools>();
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user