Table of Contents

Class Impersonation

Namespace
Dynamicweb.Security
Assembly
Dynamicweb.Security.dll
Provides methods to impersonate the authenticated identity under the code should be executed.
public class Impersonation : IDisposable
Inheritance
Impersonation
Implements
Inherited Members

Properties

DomainName

Gets domain name
public static string DomainName { get; }

Property Value

string
String value

Success

Gets value indicating whether impersonation succeeded.
public bool Success { get; }

Property Value

bool

Methods

Dispose()

public void Dispose()

Dispose(bool)

Disposes unmanaged resources.
protected virtual void Dispose(bool disposing)

Parameters

disposing bool

HostingImpersonateCredentials()

Provides hosting impersonation credentials
public static ImpersonationCredentials HostingImpersonateCredentials()

Returns

ImpersonationCredentials
ImpersonationCredentials object instnace

Impersonate(string, string)

Performs impersonation using specified user-name and password.
public bool Impersonate(string userName, string password)

Parameters

userName string
User-name.
password string
password.

Returns

bool

Impersonate(string, string, string)

Performs impersonation using specified user-name and password.
public bool Impersonate(string userName, string password, string domain)

Parameters

userName string
User-name.
password string
password.
domain string
Domain name.

Returns

bool

ImpersonateByCredentials(ImpersonationCredentials)

Performs impersonation using specified credentials.
public static Impersonation ImpersonateByCredentials(ImpersonationCredentials credentials)

Parameters

credentials ImpersonationCredentials
Credentials to use.

Returns

Impersonation

ImpersonateByFormRequest()

Performs impersonation using credentials parsed from the current POST request.
public static Impersonation ImpersonateByFormRequest()

Returns

Impersonation

ImpersonateEnd()

Terminates current impersonation.
public void ImpersonateEnd()
To top