Interface IAuthorizationEmissionRuntime
- Namespace
- Cratis.Arc.Authorization
- Assembly
- Cratis.Arc.Core.dll
Isolates native host context during observable query emissions, including after the admission request is gone.
public interface IAuthorizationEmissionRuntime
- Extension Methods
Methods
BeginEmissionScope(ClaimsPrincipal, IServiceProvider, bool)
Begins a native operation-local context. Hub subscriptions suppress native HTTP after admission; direct streams may use their still-live request context.
IDisposable? BeginEmissionScope(ClaimsPrincipal principal, IServiceProvider services, bool hasLiveRequest)
Parameters
principalClaimsPrincipalThe subscriber principal.
servicesIServiceProviderThe emission provider.
hasLiveRequestboolWhether the originating HTTP request is still alive.
Returns
- IDisposable
A scope restoring the producer's native context.
CaptureLiveRequest(IServiceProvider)
Captures only a still-live direct request so later emissions can build isolated native HTTP facades. The returned delegate must not be retained after that request completes.
Func<ClaimsPrincipal, IServiceProvider, IDisposable?>? CaptureLiveRequest(IServiceProvider services)
Parameters
servicesIServiceProviderThe admitting request provider.
Returns
- Func<ClaimsPrincipal, IServiceProvider, IDisposable>
An operation-local scope factory, or null when no native request is available.