Class AdminImpersonateService<TUser>
An in-process impersonate service.
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
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
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
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. |