.NET API
IAuditActorResolver
Tracon.Abstractions.dllResolves the actor (the who) of the current call.
public interface IAuditActorResolverRemarks
Section titled “Remarks”The default implementation reads the user of the HTTP request. It returns null when there is no authentication or the actor cannot be resolved; that state is not hidden, and the user interface shows “unknown”.
DI lifetime — singleton. Registered as a singleton with
TryAdd; a consumer’s own registration wins. The default
implementation is safe as a singleton because it does not capture any
per-request state itself — it reads IAuditActorResolver.Resolve’s caller on each
call from AuditActorContext.Current, an Threading.AsyncLocal
ambient scope that Tracon.AspNetCore populates per request (the
same mechanism as Activity.Current). A
replacement implementation that instead captured a scoped dependency in
its constructor would be a captive dependency.
Tenant behavior — TENANT-INDEPENDENT. This interface answers “which user”, never “which tenant”; it carries no tenant parameter and applies no tenant filtering of its own.
Methods
Section titled “Methods”Resolve()
Section titled “ Resolve()”Resolves the current actor.
string? Resolve()Returns
Section titled “Returns”The actor id, or null when it cannot be resolved.