Name
PrincipalPermissionAttribute
Synopsis
public sealed class PrincipalPermissionAttribute : CodeAccessSecurityAttribute {
// Public Constructors
public PrincipalPermissionAttribute(SecurityAction action
);
// Public Instance Properties
public bool Authenticated{set; get; }
public string Name{set; get; }
public string Role{set; get; }
// Public Instance Methods
public override IPermission CreatePermission( );
// overrides SecurityAttribute
}
The PrincipalPermissionAttribute
class provides
limited declarative syntax support for the
PrincipalPermission
class. The
PrincipalPermissionAttribute
class only supports
declarative security demands and does not allow code to make
declarative stack walk overrides or permission requests. The
Name
, Role
, and
Authenticated
properties provide the mechanism
through which to specify the conditions that the current
thread’s principal must meet to pass a security
demand.
Hierarchy
System.Object
→
System.Attribute
→
SecurityAttribute
→
CodeAccessSecurityAttribute
→
PrincipalPermissionAttribute
Valid On
Class, Method
Get Programming .NET Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.