Class VirtualRoleProviderBase
Base class required to implement virtual roles
Inheritance
Namespace: EPiServer.Security
Assembly: EPiServer.Framework.dll
Version: 9.12.2Syntax
public abstract class VirtualRoleProviderBase : ProviderBase
Constructors
VirtualRoleProviderBase()
Initializes a new instance of the VirtualRoleProviderBase class.
Declaration
protected VirtualRoleProviderBase()
Properties
EnableIsInRoleCache
Determines if the response from IsInRole is allowed to cached per request (enabled by default)
Declaration
public bool EnableIsInRoleCache { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
The response from the first call to IsInRole will be cached per request or thread if no request is available
SecurityEntityType
The security entity type is primarily used when checking role membership for page access rights
Declaration
public SecurityEntityType SecurityEntityType { get; protected set; }
Property Value
Type | Description |
---|---|
SecurityEntityType |
Remarks
You should use SecurityEntityType.Role to be part of the normal role checking in ASP.NET
SupportsClaims
Determines if the response from IsInRole can be added as a Role claim
Declaration
public bool SupportsClaims { get; protected set; }
Property Value
Type | Description |
---|---|
System.Boolean |
Remarks
Claims are only added when the 'addClaims' configuration setting has been enabled on the 'virtualRoles' element.
Methods
IsInVirtualRole(IPrincipal, Object)
Determines whether the specified principal is a member of this role.
Declaration
public abstract bool IsInVirtualRole(IPrincipal principal, object context)
Parameters
Type | Name | Description |
---|---|---|
System.Security.Principal.IPrincipal | principal | The principal. |
System.Object | context | External context. |
Returns
Type | Description |
---|---|
System.Boolean |
|
Remarks
The context parameter may be null but can be used to transfer external context to a Virtual role provider