diff --git a/Controllers/TestIdentity.cs b/Controllers/TestIdentity.cs index 09d3acc..9e912e6 100644 --- a/Controllers/TestIdentity.cs +++ b/Controllers/TestIdentity.cs @@ -124,7 +124,7 @@ namespace xApi.Controllers { [Authorize (Policy = XPolicies.Agent)] public ActionResult HiAgent () { // - var result = $"Hi Admin: {User.Identity.Name} ..."; + var result = $"Hi Agent: {User.Identity.Name} ..."; // return Ok (result); @@ -138,7 +138,7 @@ namespace xApi.Controllers { [Authorize (Policy = XPolicies.EnabledAgent)] public ActionResult HiEnabledAgent () { // - var result = $"Hi Admin: {User.Identity.Name} is Enabled ..."; + var result = $"Hi Agent: {User.Identity.Name} is Enabled ..."; // return Ok (result); diff --git a/Controllers/V1/AiController.cs b/Controllers/V1/AiController.cs index e824c31..4a5127e 100644 --- a/Controllers/V1/AiController.cs +++ b/Controllers/V1/AiController.cs @@ -8,6 +8,7 @@ using xAiService.Interfaces; using xCommons.Attributes; using xCommons.Configurations; using xCommons.Providers; +using xIdentityHelper; using xIdentityService.Interfaces; namespace xApi.Controllers.V1 @@ -38,8 +39,8 @@ namespace xApi.Controllers.V1 // #region Text Actions ... - [AllowAnonymous] [HttpGet("Ask")] + [Authorize(Policy = XPolicies.EnabledUser)] public override async Task> Ask( [FromQuery] string prompt, CancellationToken cancellationToken = default