ImpersonatingUserAccessor class

namespace: Serenity.Web   assemblySerenity.Net.Core

Adds impersonation support to any IUserContext implementation

public class ImpersonatingUserAccessor : IImpersonator, IUserAccessor

Public Members

name description
ImpersonatingUserAccessor(…) Initializes a new instance of the ImpersonatingUserAccessor class that wraps passed authorization service and adds impersonation support.
User { get; } Return current user
Impersonate(…) Temporarily impersonates as a user
UndoImpersonate() Undoes impersonation

See Also