System.Security.Principal Namespace

System.Security.Principal 命名空間 (Namespace) 定義主體物件,表示程式碼正在執行的安全性內容。 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

表示主體的例外狀況,該主體的識別 (Identity) 無法對應至已知的識別。Represents an exception for a principal whose identity could not be mapped to a known identity.

IdentityReference

表示識別 (Identity),且為 NTAccountSecurityIdentifier 類別的基底類別。Represents an identity and is the base class for the NTAccount and SecurityIdentifier classes. 這個類別不提供公用建構函式 (Constructor),因此無法繼承。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 提供封送處理 (Marshaling) 和比較作業。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

定義識別 (Identity) 物件的基本功能。Defines the basic functionality of an identity object.

IPrincipal

定義原則物件的基本功能。Defines the basic functionality of a principal object.

列舉

PrincipalPolicy

指定應如何為應用程式網域建立 Principal 和 Identity 物件。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).