System.Security.Principal 命名空间

定义一个主体对象,该对象表示运行代码的安全上下文。 有关详细信息,请参阅 Role-Based 安全性

名称 说明
GenericIdentity

表示泛型用户。

GenericPrincipal

表示泛型主体。

IdentityNotMappedException

表示无法将标识映射到已知标识的主体的异常。

IdentityReference

表示标识,是类SecurityIdentifier的基类NTAccount。 此类不提供公共构造函数,因此无法继承。

IdentityReferenceCollection

表示对象的集合 IdentityReference ,并提供将一组 IdentityReference派生对象转换为 IdentityReference派生类型的方法。

NTAccount

表示用户或组帐户。

SecurityIdentifier

表示安全标识符(SID),并为 SID 提供封送和比较操作。

WindowsIdentity

表示Windows用户。

WindowsImpersonationContext

表示模拟操作之前Windows用户。

WindowsPrincipal

启用代码以检查 Windows 用户的 Windows 组成员身份。

接口

名称 说明
IIdentity

定义标识对象的基本功能。

IPrincipal

定义主体对象的基本功能。

枚举

名称 说明
PrincipalPolicy

指定应如何为应用程序域创建主体和标识对象。 默认值为 UnauthenticatedPrincipal

TokenAccessLevels

定义与访问令牌关联的用户帐户的权限。

TokenImpersonationLevel

定义安全模拟级别。 安全模拟级别控制服务器进程可以代表客户端进程执行操作的程度。

WellKnownSidType

定义一组常用的安全标识符(SID)。

WindowsAccountType

指定使用的Windows帐户的类型。

WindowsBuiltInRole

指定要与 IsInRole(String)一起使用的常见角色。