System.Security.Principal 命名空间

System.Security.Principal 命名空间定义表示代码在其中运行的安全上下文的用户对象。 The System.Security.Principal namespace defines a principal object that represents the security context under which code is running. 有关详细信息,请参阅基于角色的安全性 For more information, see Role-Based Security.

GenericIdentity

表示泛型用户。Represents a generic user.

GenericPrincipal

表示泛型主体。Represents a generic principal.

IdentityNotMappedException

表示某个主体异常,此主体的标识无法映射到已知标识。Represents an exception for a principal whose identity could not be mapped to a known identity.

IdentityReference

表示一个标识,为 NTAccountSecurityIdentifier 类的基类。Represents an identity and is the base class for the NTAccount and SecurityIdentifier classes. 此类不提供公共构造函数,因为不能被继承。This class does not provide a public constructor, and therefore cannot be inherited.

IdentityReferenceCollection

表示 IdentityReference 对象的集合,并提供一种方法将 IdentityReference 派生的对象集转换为 IdentityReference 派生的类型。Represents a collection of IdentityReference objects and provides a means of converting sets of IdentityReference-derived objects to IdentityReference-derived types.

NTAccount

表示用户或组帐户。Represents a user or group account.

SecurityIdentifier

表示安全标识符 (SID),并提供 SID 的封送和比较操作。Represents a security identifier (SID) and provides marshaling and comparison operations for SIDs.

WindowsIdentity

表示 Windows 用户。Represents a Windows user.

WindowsImpersonationContext

表示模拟操作之前的 Windows 用户。Represents the Windows user prior to an impersonation operation.

WindowsPrincipal

允许代码检查 Windows 用户的 Windows 组成员身份。Enables code to check the Windows group membership of a Windows user.

接口

IIdentity

定义标识对象的基本功能。Defines the basic functionality of an identity object.

IPrincipal

定义主体对象的基本功能。Defines the basic functionality of a principal object.

枚举

PrincipalPolicy

指定应该如何为应用程序域创建用户和标识对象。Specifies how principal and identity objects should be created for an application domain. 默认值为 UnauthenticatedPrincipalThe default is UnauthenticatedPrincipal.

TokenAccessLevels

定义与访问令牌相关联的用户帐户的权限。Defines the privileges of the user account associated with the access token.

TokenImpersonationLevel

定义安全模拟级别。Defines security impersonation levels. 安全模拟级别控制服务器进程可在何种程度上代表客户端进程执行操作。Security impersonation levels govern the degree to which a server process can act on behalf of a client process.

WellKnownSidType

定义一组常用的安全标识符 (SID)。Defines a set of commonly used security identifiers (SIDs).

WindowsAccountType

指定使用的 Windows 帐户的类型。Specifies the type of Windows account used.

WindowsBuiltInRole

指定要与 IsInRole(String) 一起使用的公共角色。Specifies common roles to be used with IsInRole(String).