C# Class InvertedSoftware.WorkflowEngine.Common.Security.Impersonation

Utility class to help with Impersonation
Mostrar archivo Open project: invertedsoftware/Inverted-Software-Workflow-Engine Class Usage Examples

Public Methods

Method Description
ImpersonateValidUser ( String userName, String domain, String password ) : bool

Impersonate a User

Impersonation ( ) : System
UndoImpersonation ( ) : void

Stop impersonation and return to the current user

Private Methods

Method Description
CloseHandle ( IntPtr handle ) : bool
DuplicateToken ( IntPtr hToken, int impersonationLevel, IntPtr &hNewToken ) : int
LogonUserA ( String lpszUserName, String lpszDomain, String lpszPassword, int dwLogonType, int dwLogonProvider, IntPtr &phToken ) : int
RevertToSelf ( ) : bool

Method Details

ImpersonateValidUser() public method

Impersonate a User
public ImpersonateValidUser ( String userName, String domain, String password ) : bool
userName String The User
domain String The Domain
password String The Password
return bool

Impersonation() public method

public Impersonation ( ) : System
return System

UndoImpersonation() public method

Stop impersonation and return to the current user
public UndoImpersonation ( ) : void
return void