Show / Hide Table of Contents

Class AdminImpersonateService<TUser>

An in-process impersonate service.

Inheritance
Object
AdminImpersonateService<TUser>
Inherited Members
Object.Equals(Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: IRM.AspNetCore.Identity.UI
Assembly: IRM.AspNetCore.Identity.UI.dll
Syntax
public class AdminImpersonateService<TUser> : IAdminImpersonateService where TUser : class, IUser
Type Parameters
TUser

The type of user.

Constructors

AdminImpersonateService(ExtendedSignInManager<TUser>, IHttpContextAccessor)

Creates a new instance of AdminImpersonateService<TUser>.

Declaration
public AdminImpersonateService(ExtendedSignInManager<TUser> signInManager, IHttpContextAccessor httpContextAccessor)
Parameters
ExtendedSignInManager<TUser> signInManager

Microsoft.AspNetCore.Http.IHttpContextAccessor httpContextAccessor

Fields

RequiredActClaimTypes

Declaration
public static readonly string[] RequiredActClaimTypes
Field Value
String[]

Methods

ImpersonateSignInAsync(String)

The currently signed in user impersonates the user matching userId.

Declaration
public async Task<IActionResult> ImpersonateSignInAsync(string userId)
Parameters
String userId

The unique identifier of the user to impersonate.

Returns
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>

The task object representing the asynchronous operation, containing the Microsoft.AspNetCore.Mvc.IActionResult for the controller to return.

Implements
IAdminImpersonateService.ImpersonateSignInAsync(String)

ImpersonateSignOutAsync()

Signs the current impersonated user out of the application.

Declaration
public async Task<IActionResult> ImpersonateSignOutAsync()
Returns
System.Threading.Tasks.Task<Microsoft.AspNetCore.Mvc.IActionResult>

The task object representing the asynchronous operation, containing the Microsoft.AspNetCore.Mvc.IActionResult for the controller to return.

Implements
IAdminImpersonateService.ImpersonateSignOutAsync()
Back to top Generated by DocFX