Table of Contents

Class AdminUserManager

Namespace
Kentico.Membership
Assembly
Kentico.Membership.dll

Provides the APIs for managing user in a persistence store.

public class AdminUserManager : UserManager<AdminApplicationUser>
Inheritance
object
AdminUserManager
Extension Methods

Constructors

AdminUserManager(IUserStore<AdminApplicationUser>, IOptionsSnapshot<AdminIdentityOptions>, IPasswordHasher<AdminApplicationUser>, IEnumerable<IUserValidator<AdminApplicationUser>>, IEnumerable<IPasswordValidator<AdminApplicationUser>>, ILookupNormalizer, IdentityErrorDescriber, IServiceProvider, ILogger<AdminUserManager>, IDataProtectionProvider, ILogger<DataProtectorTokenProvider<AdminApplicationUser>>)

Creates a new instance of the AdminUserManager class.

public AdminUserManager(IUserStore<AdminApplicationUser> store, IOptionsSnapshot<AdminIdentityOptions> optionsAccessor, IPasswordHasher<AdminApplicationUser> passwordHasher, IEnumerable<IUserValidator<AdminApplicationUser>> userValidators, IEnumerable<IPasswordValidator<AdminApplicationUser>> passwordValidators, ILookupNormalizer keyNormalizer, IdentityErrorDescriber errors, IServiceProvider services, ILogger<AdminUserManager> logger, IDataProtectionProvider dataProtectionProvider, ILogger<DataProtectorTokenProvider<AdminApplicationUser>> dataProtectionLogger)

Parameters

store IUserStore<AdminApplicationUser>
optionsAccessor IOptionsSnapshot<AdminIdentityOptions>
passwordHasher IPasswordHasher<AdminApplicationUser>
userValidators IEnumerable<IUserValidator<AdminApplicationUser>>
passwordValidators IEnumerable<IPasswordValidator<AdminApplicationUser>>
keyNormalizer ILookupNormalizer
errors IdentityErrorDescriber
services IServiceProvider
logger ILogger<AdminUserManager>
dataProtectionProvider IDataProtectionProvider
dataProtectionLogger ILogger<DataProtectorTokenProvider<AdminApplicationUser>>

Methods

AddPasswordAsync(AdminApplicationUser, string)

Adds the password to the specified user. User has to be instate of pending registration which is represented by UserIsPendingRegistration

public override Task<IdentityResult> AddPasswordAsync(AdminApplicationUser user, string password)

Parameters

user AdminApplicationUser

The user whose password should be set.

password string

The password to set.

Returns

Task<IdentityResult>

CreateTwoFactorRecoveryCode()

Generate a new recovery code.

protected override string CreateTwoFactorRecoveryCode()

Returns

string

GetValidTwoFactorProvidersAsync(AdminApplicationUser)

Gets a list of valid two factor token providers for the specified user, as an asynchronous operation.

public override Task<IList<string>> GetValidTwoFactorProvidersAsync(AdminApplicationUser user)

Parameters

user AdminApplicationUser

The user the whose two factor authentication providers will be returned.

Returns

Task<IList<string>>

The System.Threading.Tasks.Task that represents result of the asynchronous operation, a list of two factor authentication providers for the specified user.

ResetPasswordAsync(AdminApplicationUser, string, string)

Resets the user's password to the specified newPassword after validating the given password reset token.

public override Task<IdentityResult> ResetPasswordAsync(AdminApplicationUser user, string token, string newPassword)

Parameters

user AdminApplicationUser

The user whose password should be reset.

token string

The password reset token to verify.

newPassword string

The new password to set if reset token verification succeeds.

Returns

Task<IdentityResult>

The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult of the operation.