Class WindowsIdentityHelper
Helper class for managing Windows identity.
public static class WindowsIdentityHelper
- Inheritance
-
objectWindowsIdentityHelper
Methods
GetCurrent()
For Windows OS returns the identity of the current user, otherwise returns null.
public static WindowsIdentity GetCurrent()
Returns
- WindowsIdentity
Impersonate(WindowsIdentity, Action)
Run given action under user represented by identity.
public static void Impersonate(WindowsIdentity identity, Action action)
Parameters
identityWindowsIdentityRepresents user used for impersonation.
actionActionAction to run.