Class WindowsIdentity
Inheritance
System.Object
WindowsIdentity
Implements
System.IDisposable
System.Runtime.Serialization.IDeserializationCallback
System.Runtime.Serialization.ISerializable
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
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
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
Token
Declaration
public virtual IntPtr Token { get; }
Property Value
| Type |
Description |
| System.IntPtr |
|
User
Declaration
public SecurityIdentifier User { get; }
Property Value
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
Dispose(Boolean)
Declaration
protected virtual void Dispose(bool disposing)
Parameters
| Type |
Name |
Description |
| System.Boolean |
disposing |
|
GetAnonymous()
Declaration
public static WindowsIdentity GetAnonymous()
Returns
GetCurrent()
Declaration
public static WindowsIdentity GetCurrent()
Returns
GetCurrent(Boolean)
Declaration
public static WindowsIdentity GetCurrent(bool ifImpersonating)
Parameters
| Type |
Name |
Description |
| System.Boolean |
ifImpersonating |
|
Returns
GetCurrent(TokenAccessLevels)
Declaration
public static WindowsIdentity GetCurrent(TokenAccessLevels desiredAccess)
Parameters
Returns
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 Parameters
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
Implements
System.IDisposable
System.Runtime.Serialization.IDeserializationCallback
System.Runtime.Serialization.ISerializable