Access and modify identity information by using the System.Security.Principal classes. (Refer System.Security.Principal namespace)
- GenericIdentity class and GenericPrincipal class
- WindowsIdentity class and WindowsPrincipal class
- NTAccount class and SecurityIdentifier class
- IIdentity interface and IPrincipal interface
- WindowsImpersonationContext class
- IdentityReference class and IdentityReferenceCollection class
This is all about the identity. It would help to have a good understanding of the identity infrastructure in .NET. There is a good writeup on the basics by Bipin Joshi.
GenericIdentity class - Represents a "Generic" user.
GenericPrincipal class - Represents a "Generic" principal.
WindowsIdentity class - Represents a windows user. Keith Brown has a good writeup on WindowsIdentity and WindowsPrincipal on his .NET Developers Guide to Security.
WindowsPrincipal class - Provides the ability to check the Windows group membership of a Windows user.
NTAccount class - New to 2.0 Represents an NT User or Group. This class has the ability to get the security identifier (useful for access control operations) via the translate method.
SecurityIdentifier class - New to 2.0. Represents a Windows Security Identifier (SID). Useful for ACL operations.
IIdentity interface - Defines the basic functionality of an identity object. Name, AuthenticationType, and IsAuthenticated are the members that must be implemented.
IPrincipal interface - Defines the basic functionality of a principal object. Identity and IsInRole must be implemented.
WindowsImpersonationContext class - Represents a windows user prior to impersonation. Allows you to revert back to the original user by calling the Undo method. Marc Merritt has a nice simple demonstration at The Code Project.
IdentityReference class - New to 2.0. Base class for NTAccount and SecurityIdentifier classes.
IdentityReferenceCollection class - New to 2.0. Collection of IdentityReference classes. Has a translate method to change objects from one type of identity to another. An example would be from NTAccount to SecurityIdentifier.
Next up -> System.Net.Mail