View Source
Class BackOfficeUserManager
Assembly: Umbraco.Web.Common.dll
Syntax
public class BackOfficeUserManager : UmbracoUserManager<BackOfficeIdentityUser, UserPasswordConfigurationSettings>, IBackOfficeUserManager, IUmbracoUserManager<BackOfficeIdentityUser>, ICoreBackOfficeUserManager
Constructors
View Source
BackOfficeUserManager(IIpResolver, IUserStore<BackOfficeIdentityUser>, IOptions<BackOfficeIdentityOptions>, IPasswordHasher<BackOfficeIdentityUser>, IEnumerable<IUserValidator<BackOfficeIdentityUser>>, IEnumerable<IPasswordValidator<BackOfficeIdentityUser>>, BackOfficeErrorDescriber, IServiceProvider, IHttpContextAccessor, ILogger<UserManager<BackOfficeIdentityUser>>, IOptions<UserPasswordConfigurationSettings>, IEventAggregator, IBackOfficeUserPasswordChecker, IOptions<GlobalSettings>)
Declaration
public BackOfficeUserManager(IIpResolver ipResolver, IUserStore<BackOfficeIdentityUser> store, IOptions<BackOfficeIdentityOptions> optionsAccessor, IPasswordHasher<BackOfficeIdentityUser> passwordHasher, IEnumerable<IUserValidator<BackOfficeIdentityUser>> userValidators, IEnumerable<IPasswordValidator<BackOfficeIdentityUser>> passwordValidators, BackOfficeErrorDescriber errors, IServiceProvider services, IHttpContextAccessor httpContextAccessor, ILogger<UserManager<BackOfficeIdentityUser>> logger, IOptions<UserPasswordConfigurationSettings> passwordConfiguration, IEventAggregator eventAggregator, IBackOfficeUserPasswordChecker backOfficeUserPasswordChecker, IOptions<GlobalSettings> globalSettings)
Parameters
Methods
View Source
AccessFailedAsync(BackOfficeIdentityUser)
Overrides the Microsoft ASP.NET user management method
Declaration
public override Task<IdentityResult> AccessFailedAsync(BackOfficeIdentityUser user)
Parameters
Returns
| Type |
Description |
| Task<IdentityResult> |
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult of the operation.
|
View Source
ChangePasswordAsync(BackOfficeIdentityUser, string, string)
Changes a user's password after confirming the specified currentPassword is correct,
as an asynchronous operation.
Declaration
public override Task<IdentityResult> ChangePasswordAsync(BackOfficeIdentityUser user, string currentPassword, string newPassword)
Parameters
| Type |
Name |
Description |
| BackOfficeIdentityUser |
user |
The user whose password should be set.
|
| string |
currentPassword |
The current password to validate before changing.
|
| string |
newPassword |
The new password to set for the specified user.
|
Returns
| Type |
Description |
| Task<IdentityResult> |
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult
of the operation.
|
View Source
ChangePasswordWithResetAsync(string, string, string)
This is a special method that will reset the password but will raise the Password Changed event instead of the
reset event
Declaration
public override Task<IdentityResult> ChangePasswordWithResetAsync(string userId, string token, string newPassword)
Parameters
| Type |
Name |
Description |
| string |
userId |
The userId
|
| string |
token |
The reset password token
|
| string |
newPassword |
The new password to set it to
|
Returns
| Type |
Description |
| Task<IdentityResult> |
The Microsoft.AspNetCore.Identity.IdentityResult
|
View Source
CreateAsync(UserCreateModel)
Declaration
public Task<IdentityCreationResult> CreateAsync(UserCreateModel createModel)
Parameters
Returns
View Source
CreateForInvite(UserCreateModel)
Creates a user for an invite. This means that the password will not be populated with
Declaration
public Task<IdentityCreationResult> CreateForInvite(UserCreateModel createModel)
Parameters
Returns
View Source
GenerateEmailConfirmationTokenAsync(IUser)
Declaration
public Task<Attempt<string, UserOperationStatus>> GenerateEmailConfirmationTokenAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
Returns
View Source
GeneratePasswordResetTokenAsync(IUser)
Declaration
public Task<Attempt<string, UserOperationStatus>> GeneratePasswordResetTokenAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
Returns
View Source
GetLoginsAsync(IUser)
Declaration
public Task<Attempt<ICollection<IIdentityUserLogin>, UserOperationStatus>> GetLoginsAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
Returns
View Source
IsEmailConfirmationTokenValidAsync(IUser, string)
Declaration
public Task<bool> IsEmailConfirmationTokenValidAsync(IUser user, string token)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
| string |
token |
|
Returns
| Type |
Description |
| Task<bool> |
|
View Source
IsResetPasswordTokenValidAsync(IUser, string)
Declaration
public Task<bool> IsResetPasswordTokenValidAsync(IUser user, string token)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
| string |
token |
|
Returns
| Type |
Description |
| Task<bool> |
|
View Source
NotifyAccountLocked(IPrincipal?, string?)
Declaration
public void NotifyAccountLocked(IPrincipal? currentUser, string? userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyAccountUnlocked(IPrincipal?, string)
Declaration
public void NotifyAccountUnlocked(IPrincipal? currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyForgotPasswordChanged(IPrincipal, string)
Declaration
public void NotifyForgotPasswordChanged(IPrincipal currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyForgotPasswordRequested(IPrincipal, string)
Declaration
public void NotifyForgotPasswordRequested(IPrincipal currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyLoginFailed(IPrincipal?, string)
Declaration
public void NotifyLoginFailed(IPrincipal? currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyLoginRequiresVerification(IPrincipal, string?)
Declaration
public void NotifyLoginRequiresVerification(IPrincipal currentUser, string? userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyLoginSuccess(IPrincipal, string)
Declaration
public void NotifyLoginSuccess(IPrincipal currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyLogoutSuccess(IPrincipal, string?)
Declaration
public SignOutSuccessResult NotifyLogoutSuccess(IPrincipal currentUser, string? userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
Returns
View Source
NotifyPasswordChanged(IPrincipal?, string)
Declaration
public void NotifyPasswordChanged(IPrincipal? currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyPasswordReset(IPrincipal?, string)
Declaration
public void NotifyPasswordReset(IPrincipal? currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
NotifyResetAccessFailedCount(IPrincipal?, string)
Declaration
public void NotifyResetAccessFailedCount(IPrincipal? currentUser, string userId)
Parameters
| Type |
Name |
Description |
| IPrincipal |
currentUser |
|
| string |
userId |
|
View Source
ResetAccessFailedCountAsync(BackOfficeIdentityUser)
Resets the access failed count for the specified user.
Declaration
public override Task<IdentityResult> ResetAccessFailedCountAsync(BackOfficeIdentityUser user)
Parameters
Returns
| Type |
Description |
| Task<IdentityResult> |
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult of the operation.
|
View Source
SetLockoutEndDateAsync(BackOfficeIdentityUser, DateTimeOffset?)
Locks out a user until the specified end date has passed. Setting a end date in the past immediately unlocks a user.
Declaration
public override Task<IdentityResult> SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset? lockoutEnd)
Parameters
| Type |
Name |
Description |
| BackOfficeIdentityUser |
user |
The user whose lockout date should be set.
|
| DateTimeOffset? |
lockoutEnd |
The System.DateTimeOffset after which the user's lockout should end.
|
Returns
| Type |
Description |
| Task<IdentityResult> |
The System.Threading.Tasks.Task that represents the asynchronous operation, containing the Microsoft.AspNetCore.Identity.IdentityResult of the operation.
|
View Source
UnlockUser(IUser)
Declaration
public Task<Attempt<UserUnlockResult, UserOperationStatus>> UnlockUser(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
|
Returns
View Source
VerifyPasswordAsync(IUserPasswordStore<BackOfficeIdentityUser>, BackOfficeIdentityUser, string)
Declaration
protected override Task<PasswordVerificationResult> VerifyPasswordAsync(IUserPasswordStore<BackOfficeIdentityUser> store, BackOfficeIdentityUser user, string password)
Parameters
Returns
| Type |
Description |
| Task<PasswordVerificationResult> |
|