From 971f6f572fa266e3d7c87eaa631569427f58f546 Mon Sep 17 00:00:00 2001 From: dmolinari Date: Tue, 14 Apr 2026 13:17:12 -0300 Subject: [PATCH] feat(app): add IClientContext abstraction for IP and UserAgent --- .../Abstractions/IClientContext.cs | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 src/api/SIGCM2.Application/Abstractions/IClientContext.cs diff --git a/src/api/SIGCM2.Application/Abstractions/IClientContext.cs b/src/api/SIGCM2.Application/Abstractions/IClientContext.cs new file mode 100644 index 0000000..4eb3ea6 --- /dev/null +++ b/src/api/SIGCM2.Application/Abstractions/IClientContext.cs @@ -0,0 +1,12 @@ +namespace SIGCM2.Application.Abstractions; + +/// +/// Provides HTTP client metadata (IP address and User-Agent) from the current request context. +/// Implemented in Infrastructure via IHttpContextAccessor. +/// Mockable in tests without HTTP stack. +/// +public interface IClientContext +{ + string Ip { get; } + string? UserAgent { get; } +}