AuditActorContext
AgentPrism.Core.dllAn ambient context that carries the user of the current call.
public static class AuditActorContextInheritance
Section titled “Inheritance”Inherited Members
Section titled “Inherited Members”object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()
Remarks
Section titled “Remarks”AgentPrism.AspNetCore writes HttpContext.User to AuditActorContext.Current
at the start of every protected request, after security checks pass. The value is
held in Threading.AsyncLocal, so code later in the same request’s async call
chain, such as a store decorator, can read it. This is the same mechanism as Activity.Current.
This design lets AgentPrism.Core read the actor without adding a dependency
on IHttpContextAccessor or ASP.NET Core. ClaimsPrincipal is in
the base.NET library, not specific to ASP.NET Core.
Properties
Section titled “Properties”Current
Section titled “ Current”The user of the current call, or null when it is not set.
public static ClaimsPrincipal? Current { get; set; }