Table of Contents

Class HttpContextCurrentActorAccessor

Namespace
ProjectTemplate.Web.Accessors
Assembly
ProjectTemplate.Web.dll

An implementation of ICurrentActorAccessor that retrieves the current actor information from the HTTP context.

public sealed class HttpContextCurrentActorAccessor : ICurrentActorAccessor
Inheritance
HttpContextCurrentActorAccessor
Implements
Inherited Members

Constructors

HttpContextCurrentActorAccessor(IHttpContextAccessor)

An implementation of ICurrentActorAccessor that retrieves the current actor information from the HTTP context.

public HttpContextCurrentActorAccessor(IHttpContextAccessor httpContextAccessor)

Parameters

httpContextAccessor IHttpContextAccessor

Properties

CurrentActor

Accesses the current actor information from the HTTP context. It first attempts to retrieve the authenticated normalized application subject claim, then the provider subject claim, then falls back to the authenticated name identifier claim, then the remote IP address. If none are available, it returns "Unknown".

public string CurrentActor { get; }

Property Value

string