Try our conversational search powered by Generative AI!

Interface IPrincipalAccessor

Accessor to get current System.Security.Principal.IPrincipal

Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 11.20.7
Syntax
public interface IPrincipalAccessor

Properties

Principal

Gets or sets the System.Security.Principal.IPrincipal associated with current context.

Declaration
IPrincipal Principal { get; set; }
Property Value
Type Description
System.Security.Principal.IPrincipal

The current principal.

Remarks

This method will use user from the HttpContext if it exists, otherwise it will fallback to the the Thread.CurrentPrincipal setting.

When you get the current principal you are assured to always get a valid IPrincipal.

Extension Methods