Interface ICurrentPrincipalOverride
- Namespace
- Cratis.Arc.Authorization
- Assembly
- Cratis.Arc.Core.dll
Defines a system for overriding the current principal for server-side execution.
public interface ICurrentPrincipalOverride
- Extension Methods
Methods
BeginScope(ClaimsPrincipal)
Begins a scope that overrides the current principal for server-side execution.
IDisposable BeginScope(ClaimsPrincipal principal)
Parameters
principalClaimsPrincipalThe ClaimsPrincipal to execute as.
Returns
- IDisposable
An IDisposable that restores the previous principal when disposed.
Remarks
The override is ignored while an HTTP request is in progress — the request principal always wins — so a server-side scope can never influence authorization of an HTTP-origin command.