C# Developer[ap]s Guide to ASP. NET, XML, and ADO. NET
| for RuBoard |
This section provides a quick interface reference to the key objects described in this chapter. Space constraints prevent us from documenting every object in the .NET framework in this book; for the sake of brevity and conciseness, we include only the most important objects here. For more information on the other objects in the .NET framework, consult the .NET Framework Reference online help file.
GenericIdentity Class
Member of System.Security.Principal.
Assembly: mscorlib.dll.
The GenericIdentity class represents the identity of authenticated users and the method used to authenticate them. Derive from this class to provide additional information to the Identity specific to a custom authentication method.
| Properties | ||
|---|---|---|
| AuthenticationType | IsAuthenticated | Name |
WindowsIdentity Class
Member of System.Security.Principal.
Assembly: mscorlib.dll.
The WindowsIdentity class is used when you want to rely on Windows security. This class implements IIdentity and adds additional properties dealing with Windows security.
| Properties | ||
|---|---|---|
| AuthenticationType | IsAnonymous | IsAuthenticated |
| IsGuest | IsSystem | Name |
| Token | ||
| Methods | ||
| GetAnonymous | GetCurrent | Impersonate |
The IPrincipal interface represents the security context of a user. The principal contains an Identity for the user as well as any role-based information about the user . Just as .NET provided two implementations of IIdentity, it also provides two implementations of IPrincipal. The first, GenericPrincipal, is a generic implementation of IPrincipal with a simple array of strings representing the roles. The roles are passed in as part of the constructor. It also provides an implementation of IsInRole() that checks whether a passed-in role is contained within the list of within the list of roles.
GenericPrincipal Class
Member of System.Security.Principal.
Assembly: mscorlib.dll.
The GenericPrincipal class is a minimal implementation of the IPrincipal interface.
| Properties |
|---|
| Identity |
| Methods |
| IsInRole |
WindowsPrincipal Class
Member of System.Security.Principal.
Assembly: mscorlib.dll.
The WindowsPrincipal class is an implementation of IPrincipal intended for use with Windows-based groups. The implementation of IsInRole() checks the user's membership in a Windows local or domain group .
| Properties |
|---|
| Identity |
| Methods |
| IsInRole |
WindowsBuiltInRole Enumeration
Member of System.Security.Principal.
Assembly: mscorlib.dll.
The WindowsBuiltInRole enumeration provides a language-independent way to check for membership in the built-in Windows groups.
| Values | ||
|---|---|---|
| AccountOperator | Administrator | BackupOperator |
| Guest | PowerUser | PrintOperator |
| Replicator | SystemOperator | User |
PassportIdentity
Member of System.Web.Security.
Assembly: System.Web.dll.
This class contains functionality for interacting with the passport authentication service.
| Properties | ||
|---|---|---|
| AuthenticationType | Error | GetFromNetworkServer |
| HasSavedPassword | HasTicket | IsAuthenticated |
| Item | Name | TicketAge |
| TimeSinceSignIn | ||
| Methods | ||
| AuthUrl2 | GetDomainAttribute | GetDomainFromMemberName |
| GetIsAuthenticated | GetProfileObject | HasFlag |
| HasProfile | HaveConsent | LoginUser |
| LogoTag2 | ||
| Static Methods | ||
| Compress | CryptIsValid | CryptPutHost |
| CryptPutSite | Decompress | Decrypt |
| Encrypt | SignOut | |
| for RuBoard |