Interface IApplicationContext
Gives access to the context of the running application: the current principal. Depending on the implementation the context is a singleton (UI, single instance applications, unit tests) or scoped (ASP.NET Core back-ends).
public interface IApplicationContext
Properties
Principal
Gets the current principal, or null when nobody is authenticated.
AppPrincipal? Principal { get; }
Property Value
Methods
SetPrincipal(AppPrincipal?)
Sets the current principal.
void SetPrincipal(AppPrincipal? principal)
Parameters
principalAppPrincipalThe principal, or null to clear it.