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

Utility class to help with Impersonation
Afficher le fichier Open project: invertedsoftware/Inverted-Software-Workflow-Engine Class Usage Examples

Méthodes publiques

Méthode 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

Méthode 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 méthode

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

Impersonation() public méthode

public Impersonation ( ) : System
Résultat System

UndoImpersonation() public méthode

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