Udostępnij za pośrednictwem


Classes Used in .NET Framework User Operations (Visual Basic)

The IIdentity and IPrincipal interfaces form the basis of the .NET Framework user-authentication system. You can use implementations of these interfaces that the .NET Framework provides, or you can implement these classes yourself.

Basic Classes Used for User Operations

Most of the classes that support user operations are located in the System.Security.Principal namespace. For a more comprehensive listing, consult the .NET Framework documentation.

The following classes implement the IIdentity interface, which defines the basic functionality of an identity object.

Class

Description

GenericIdentity

Represents a generic user.

WindowsIdentity

Represents a Windows user.

IdentityReference

Represents an identity and is the base class for the NTAccount and SecurityIdentifier classes.

NTAccount

Represents a user or group account.

SecurityIdentifier

Represents a security identifier (SID) and provides marshaling and comparison operations for SIDs.

The following classes implement the IPrincipal interface, which defines the basic functionality of a principal object.

Class

Description

GenericPrincipal

Represents a generic principal.

WindowsPrincipal

Allows code to check the Windows group membership of a Windows user.

This table lists the most important enumerations used for .NET Framework user operations.

Enumeration

Description

PrincipalPolicy

Specifies how principal and identity objects should be created for an application domain.

WellKnownSidType

Defines a set of commonly used security identifiers (SIDs).

WindowsAccountType

Specifies the type of Windows account used.

WindowsBuiltInRole

Specifies common roles to be used with IsInRole.

See Also

Tasks

Walkthrough: Implementing Custom Authentication and Authorization (Visual Basic)

Reference

User

Other Resources

Authentication and Authorization in the .NET Framework with Visual Basic