From 1326407462d79df002a710a67843637badb423ef Mon Sep 17 00:00:00 2001 From: TekH Date: Fri, 12 Jun 2026 15:15:44 +0200 Subject: [PATCH] Update AuthController to use specific auth scheme The `[Authorize]` attribute on the `Check` method was updated to specify the `AuthScheme.Sender` authentication scheme. This change ensures that the `Check` endpoint now requires authentication using this specific scheme, enhancing security and supporting multiple authentication schemes within the application. --- EnvelopeGenerator.API/Controllers/AuthController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/EnvelopeGenerator.API/Controllers/AuthController.cs b/EnvelopeGenerator.API/Controllers/AuthController.cs index 6a3500c9..b6044216 100644 --- a/EnvelopeGenerator.API/Controllers/AuthController.cs +++ b/EnvelopeGenerator.API/Controllers/AuthController.cs @@ -69,7 +69,7 @@ public partial class AuthController(IOptions authTokenKeyOptions, [ProducesResponseType(typeof(void), StatusCodes.Status200OK)] [ProducesResponseType(typeof(void), StatusCodes.Status401Unauthorized)] [HttpGet("check")] - [Authorize] + [Authorize(AuthenticationSchemes = AuthScheme.Sender)] public IActionResult Check(string? role = null) => role is not null && !User.IsInRole(role) ? Unauthorized()