using xIdentityHelper; using System.Threading; using xCommons.Providers; using Newtonsoft.Json.Linq; using xAiService.Interfaces; using System.Threading.Tasks; using xAiService.Controllers; using xCommons.Configurations; using Microsoft.AspNetCore.Mvc; using xIdentityService.Interfaces; using Microsoft.Extensions.Logging; using Microsoft.AspNetCore.Authorization; namespace xAiMcpServer.Controllers { [Authorize] public class McpController : XAiMcpControllerBase { public McpController( IXAiMcpHandler mcpHandler, ILogger logger, XAppConfiguration appConfiguration, IXIdentityProvider identityProvider, XValidationProvider validationProvider ) : base(mcpHandler, appConfiguration, identityProvider, logger, validationProvider) { } // #region Override ... /// /// Handle MCP ... /// /// /// /// [HttpPost] [Authorize(Policy = XPolicies.EnabledUser)] public override async Task HandleMcp( [FromBody] JObject request, CancellationToken cancellationToken = default ) { // var userInfo = await GetUserInfo(); var connectionId = GetConnectionId(); // var result = await base .HandleMcp( request: request, cancellationToken: cancellationToken ); // return result; } /// /// Handle SSE EndPoint ... /// /// /// [HttpGet("sse")] [AllowAnonymous] public override async Task SseEndpoint( CancellationToken cancellationToken = default ) { // await base .SseEndpoint(cancellationToken); } #endregion } }