November Happy Hour will be moved to Thursday December 5th.

Interface IPrincipalAccessor

Accessor to get current System.Security.Principal.IPrincipal

Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 12.0.3
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