Chapter 24. What Are WindowsIdentity and WindowsPrincipal?
These classes work together to represent a Windows token (Item 16) and provide implementations of the abstract interfaces IIdentity
and IPrincipal
, which I discussed in Item 15. Here are the public members of these classes.
namespace System.Security.Principal { public class WindowsIdentity : IIdentity { // I've omitted some redundant constructor overloads public WindowsIdentity(IntPtr token, string authnType, WindowsAccountType accountType, bool isAuthenticated); public WindowsIdentity(string userPrincipalName, string authnType); public bool IsAnonymous { get; } public bool IsSystem { get; } public bool IsGuest { get; } public virtual IntPtr Token { get; } public virtual WindowsImpersonationContext ...
Get The .NET Developer's Guide to Windows Security now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.