Handle Authentication and Authorization in xAiMcpServer ...

This commit is contained in:
2026-11-05 20:08:43 +03:30
parent 7ba0916461
commit 33dda6bee7
2 changed files with 14 additions and 0 deletions
+12
View File
@@ -20,6 +20,18 @@ namespace xAiModels.Attributes
/// <value></value>
public string Description { get; set; }
/// <summary>
/// Specify it's Required to Authenticated or not ...
/// </summary>
/// <value></value>
public bool RequiresAuthentication { get; set; } = false;
/// <summary>
/// Authorization and Policiy ...
/// </summary>
/// <value></value>
public string RequiredPolicy { get; set; } = string.Empty;
public XAiMcpToolAttribute(string name = null)
{
Name = name;
+2
View File
@@ -10,6 +10,8 @@ namespace xAiModels.Models
public string Name { get; set; }
public string Description { get; set; }
public JObject InputSchema { get; set; }
public string RequiredPolicy { get; set; }
public bool RequiresAuthentication { get; set; } = false;
public Func<JObject, CancellationToken, Task<string>> Execute { get; set; }
}
}