Search Results for

    Show / Hide Table of Contents

    Class WindowsIdentity

    Inheritance
    System.Object
    WindowsIdentity
    Implements
    System.IDisposable
    System.Runtime.Serialization.IDeserializationCallback
    System.Runtime.Serialization.ISerializable
    Namespace: System.Security.Principal
    Assembly: IronZip.dll
    Syntax
    public class WindowsIdentity : ClaimsIdentity

    Constructors

    WindowsIdentity(IntPtr)

    Declaration
    public WindowsIdentity(IntPtr userToken)
    Parameters
    Type Name Description
    System.IntPtr userToken

    WindowsIdentity(IntPtr, String)

    Declaration
    public WindowsIdentity(IntPtr userToken, string type)
    Parameters
    Type Name Description
    System.IntPtr userToken
    System.String type

    WindowsIdentity(IntPtr, String, WindowsAccountType)

    Declaration
    public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType)
    Parameters
    Type Name Description
    System.IntPtr userToken
    System.String type
    WindowsAccountType acctType

    WindowsIdentity(IntPtr, String, WindowsAccountType, Boolean)

    Declaration
    public WindowsIdentity(IntPtr userToken, string type, WindowsAccountType acctType, bool isAuthenticated)
    Parameters
    Type Name Description
    System.IntPtr userToken
    System.String type
    WindowsAccountType acctType
    System.Boolean isAuthenticated

    WindowsIdentity(SerializationInfo, StreamingContext)

    Declaration
    public WindowsIdentity(SerializationInfo info, StreamingContext context)
    Parameters
    Type Name Description
    System.Runtime.Serialization.SerializationInfo info
    System.Runtime.Serialization.StreamingContext context

    WindowsIdentity(WindowsIdentity)

    Declaration
    protected WindowsIdentity(WindowsIdentity identity)
    Parameters
    Type Name Description
    WindowsIdentity identity

    WindowsIdentity(String)

    Declaration
    public WindowsIdentity(string sUserPrincipalName)
    Parameters
    Type Name Description
    System.String sUserPrincipalName

    Fields

    DefaultIssuer

    Declaration
    public const string DefaultIssuer = "AD AUTHORITY"
    Field Value
    Type Description
    System.String

    Properties

    AccessToken

    Declaration
    public  < 8f  623  c64 - e609 - 4  c12 - bbf0 - 00022  ad160f3 > SafeAccessTokenHandle AccessToken { get; }
    Property Value
    Type Description
    Microsoft.Win32.SafeHandles.<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle

    AuthenticationType

    Declaration
    public sealed override string AuthenticationType { get; }
    Property Value
    Type Description
    System.String

    Claims

    Declaration
    public override IEnumerable<Claim> Claims { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>

    DeviceClaims

    Declaration
    public virtual IEnumerable<Claim> DeviceClaims { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>

    Groups

    Declaration
    public IdentityReferenceCollection Groups { get; }
    Property Value
    Type Description
    IdentityReferenceCollection

    ImpersonationLevel

    Declaration
    public TokenImpersonationLevel ImpersonationLevel { get; }
    Property Value
    Type Description
    System.Security.Principal.TokenImpersonationLevel

    IsAnonymous

    Declaration
    public virtual bool IsAnonymous { get; }
    Property Value
    Type Description
    System.Boolean

    IsAuthenticated

    Declaration
    public override bool IsAuthenticated { get; }
    Property Value
    Type Description
    System.Boolean

    IsGuest

    Declaration
    public virtual bool IsGuest { get; }
    Property Value
    Type Description
    System.Boolean

    IsSystem

    Declaration
    public virtual bool IsSystem { get; }
    Property Value
    Type Description
    System.Boolean

    Name

    Declaration
    public override string Name { get; }
    Property Value
    Type Description
    System.String

    Owner

    Declaration
    public SecurityIdentifier Owner { get; }
    Property Value
    Type Description
    SecurityIdentifier

    Token

    Declaration
    public virtual IntPtr Token { get; }
    Property Value
    Type Description
    System.IntPtr

    User

    Declaration
    public SecurityIdentifier User { get; }
    Property Value
    Type Description
    SecurityIdentifier

    UserClaims

    Declaration
    public virtual IEnumerable<Claim> UserClaims { get; }
    Property Value
    Type Description
    System.Collections.Generic.IEnumerable<System.Security.Claims.Claim>

    Methods

    Clone()

    Declaration
    public override ClaimsIdentity Clone()
    Returns
    Type Description
    System.Security.Claims.ClaimsIdentity

    Dispose()

    Declaration
    public void Dispose()

    Dispose(Boolean)

    Declaration
    protected virtual void Dispose(bool disposing)
    Parameters
    Type Name Description
    System.Boolean disposing

    GetAnonymous()

    Declaration
    public static WindowsIdentity GetAnonymous()
    Returns
    Type Description
    WindowsIdentity

    GetCurrent()

    Declaration
    public static WindowsIdentity GetCurrent()
    Returns
    Type Description
    WindowsIdentity

    GetCurrent(Boolean)

    Declaration
    public static WindowsIdentity GetCurrent(bool ifImpersonating)
    Parameters
    Type Name Description
    System.Boolean ifImpersonating
    Returns
    Type Description
    WindowsIdentity

    GetCurrent(TokenAccessLevels)

    Declaration
    public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess)
    Parameters
    Type Name Description
    TokenAccessLevels desiredAccess
    Returns
    Type Description
    WindowsIdentity

    RunImpersonated(<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle, Action)

    Declaration
    public static void RunImpersonated( < 8f  623  c64 - e609 - 4  c12 - bbf0 - 00022  ad160f3 > SafeAccessTokenHandle safeAccessTokenHandle, Action action)
    Parameters
    Type Name Description
    Microsoft.Win32.SafeHandles.<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle safeAccessTokenHandle
    System.Action action

    RunImpersonated<T>(<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle, Func<T>)

    Declaration
    public static T RunImpersonated<T>( < 8f  623  c64 - e609 - 4  c12 - bbf0 - 00022  ad160f3 > SafeAccessTokenHandle safeAccessTokenHandle, Func<T> func)
    Parameters
    Type Name Description
    Microsoft.Win32.SafeHandles.<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle safeAccessTokenHandle
    System.Func<T> func
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    RunImpersonatedAsync(<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle, Func<Task>)

    Declaration
    public static Task RunImpersonatedAsync( < 8f  623  c64 - e609 - 4  c12 - bbf0 - 00022  ad160f3 > SafeAccessTokenHandle safeAccessTokenHandle, Func<Task> func)
    Parameters
    Type Name Description
    Microsoft.Win32.SafeHandles.<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle safeAccessTokenHandle
    System.Func<System.Threading.Tasks.Task> func
    Returns
    Type Description
    System.Threading.Tasks.Task

    RunImpersonatedAsync<T>(<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle, Func<Task<T>>)

    Declaration
    public static Task<T> RunImpersonatedAsync<T>( < 8f  623  c64 - e609 - 4  c12 - bbf0 - 00022  ad160f3 > SafeAccessTokenHandle safeAccessTokenHandle, Func<Task<T>> func)
    Parameters
    Type Name Description
    Microsoft.Win32.SafeHandles.<8f623c64-e609-4c12-bbf0-00022ad160f3>SafeAccessTokenHandle safeAccessTokenHandle
    System.Func<System.Threading.Tasks.Task<T>> func
    Returns
    Type Description
    System.Threading.Tasks.Task<T>
    Type Parameters
    Name Description
    T

    Implements

    System.IDisposable
    System.Runtime.Serialization.IDeserializationCallback
    System.Runtime.Serialization.ISerializable
    ☀
    ☾
    Downloads
    • Download with NuGet
    • Start for Free
    In This Article
    Back to top
    Install with NuGet
    Want to deploy IronZIP to a live project for FREE?
    What’s included?
    30 days of fully-functional product
    Test and share in a live environment
    No watermarks in production
    Get your free 30-day Trial Key instantly.
    No credit card or account creation required
    Your Trial License Key has been emailed to you.
    Download IronZIP free to apply
    your Trial Licenses Key
    Install with NuGet View Licenses
    Licenses from $499. Have a question? Get in touch.