Table of Contents

Interface IApplicationContext

Namespace
Arc4u.Security.Principal
Assembly
Arc4u.dll

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

AppPrincipal

Methods

SetPrincipal(AppPrincipal?)

Sets the current principal.

void SetPrincipal(AppPrincipal? principal)

Parameters

principal AppPrincipal

The principal, or null to clear it.