Skip to content

AmbientAuditActorResolver

Namespace AgentPrism · Assembly AgentPrism.Core.dll

The default implementation that reads the actor from the user in AuditActorContext.

public sealed class AmbientAuditActorResolver : IAuditActorResolver

objectAmbientAuditActorResolver

IAuditActorResolver

object.GetType(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Read order: the configured AgentPrismAuditOptions.ActorClaimType claim; otherwise ClaimTypes.NameIdentifierClaimTypes.Namesubnull.

AmbientAuditActorResolver(IOptions<AgentPrismOptions>)

Section titled “ AmbientAuditActorResolver(IOptions<AgentPrismOptions>)”

Initializes a new resolver.

public AmbientAuditActorResolver(IOptions<AgentPrismOptions> options)

options IOptions<AgentPrismOptions>

The AgentPrism options.

ArgumentNullException

options is null.

Resolves the current actor.

public string? Resolve()

string?

The actor id, or null when it cannot be resolved.