Click or drag to resize

Impersonator Class

Allows code to be executed under the security context of a specified user account.
Inheritance Hierarchy
SystemObject
  Seal.HelpersImpersonator

Namespace: Seal.Helpers
Assembly: SealLibrary (in SealLibrary.dll) Version: 10.0.1.0+a44cd3a7f03c2bf3cdbd971a878c679e40bed08a
Syntax
C#
public class Impersonator : IDisposable

The Impersonator type exposes the following members.

Constructors
 NameDescription
Public methodImpersonator Constructor using the identity of the current user
Public methodImpersonator(String, String, String) Constructor performing a Windows logon with the given credentials
Top
Methods
 NameDescription
Public methodStatic memberCheckWindowsLogin Check Windows credentials by performing a logon and return the resulting identity
Public methodEqualsDetermines whether the specified object is equal to the current object.
(Inherited from Object)
Protected methodFinalizeAllows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.
(Inherited from Object)
Public methodGetHashCodeServes as the default hash function.
(Inherited from Object)
Public methodGetTypeGets the Type of the current instance.
(Inherited from Object)
Public methodLogin Perform a Windows logon with the given credentials and set the Identity. An exception is thrown if the logon fails.
Public methodLogout Close the logon token and dispose the current identity
Protected methodMemberwiseCloneCreates a shallow copy of the current Object.
(Inherited from Object)
Public methodToStringReturns a string that represents the current object.
(Inherited from Object)
Top
Fields
 NameDescription
Public fieldIdentity Windows identity of the impersonated user
Protected fieldStatic memberLOGON32_LOGON_INTERACTIVE Interactive logon type for the LogonUser Windows API
Protected fieldStatic memberLOGON32_PROVIDER_DEFAULT Default logon provider for the LogonUser Windows API
Top
See Also