<PackageReference Include="System.Security.Principal.Windows" Version="4.7.0-preview1.19504.10" />

WindowsIdentity

Represents a Windows user.
using Microsoft.Win32.SafeHandles; using System.Collections.Generic; using System.Runtime.Serialization; using System.Security.Claims; namespace System.Security.Principal { public class WindowsIdentity : ClaimsIdentity, IDisposable, IDeserializationCallback, ISerializable { public new const string DefaultIssuer = "AD AUTHORITY"; public SafeAccessTokenHandle AccessToken { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public sealed override string AuthenticationType { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public override IEnumerable<Claim> Claims { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual IEnumerable<Claim> DeviceClaims { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public IdentityReferenceCollection Groups { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public TokenImpersonationLevel ImpersonationLevel { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual bool IsAnonymous { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public override bool IsAuthenticated { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual bool IsGuest { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual bool IsSystem { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public override string Name { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public SecurityIdentifier Owner { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual IntPtr Token { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public SecurityIdentifier User { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public virtual IEnumerable<Claim> UserClaims { get { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } public WindowsIdentity(IntPtr userToken) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public WindowsIdentity(IntPtr userToken, string type) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public WindowsIdentity(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } protected WindowsIdentity(WindowsIdentity identity) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public WindowsIdentity(string sUserPrincipalName) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public override ClaimsIdentity Clone() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public void Dispose() { } protected virtual void Dispose(bool disposing) { } public static WindowsIdentity GetAnonymous() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public static WindowsIdentity GetCurrent() { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public static WindowsIdentity GetCurrent(bool ifImpersonating) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public static void RunImpersonated(SafeAccessTokenHandle safeAccessTokenHandle, Action action) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } public static T RunImpersonated<T>(SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } void IDeserializationCallback.OnDeserialization(object sender) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } void ISerializable.GetObjectData(SerializationInfo info, StreamingContext context) { throw new PlatformNotSupportedException(System.SR.PlatformNotSupported_Principal); } } }