Skip to main content
Table of Contents

Interface ISessionContextProvider

Namespace
Stratara.Abstractions.Session
Assembly
Stratara.Abstractions.dll

Provides ambient access to the dual-identity SessionContext (Actor + Subject) for the currently-executing request, worker message, or saga step.

public interface ISessionContextProvider
Extension Methods

Remarks

Set by middleware on HTTP requests, by the command worker per dispatched message, and by the saga worker per emitted command. Tenant filters, repositories, encryption AAD, and projection routing read the Subject (TenantId); audit trails read the Actor (ActorTenantId / ActorUserId).

Properties

Current

The current session context, or null when none is set.

SessionContext? Current { get; }

Property Value

SessionContext

Methods

Clear()

Clear the current session context — typically at the end of a unit of work.

void Clear()

Set(SessionContext)

Set the current session context for the executing logical operation.

void Set(SessionContext context)

Parameters

context SessionContext