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> |
|
View Source
ChangePasswordAsync(BackOfficeIdentityUser, string, string)
Declaration
public override Task<IdentityResult> ChangePasswordAsync(BackOfficeIdentityUser user, string currentPassword, string newPassword)
Parameters
Returns
| Type |
Description |
| Task<IdentityResult> |
|
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)
Creates a new back office user.
Declaration
public Task<IdentityCreationResult> CreateAsync(UserCreateModel createModel)
Parameters
| Type |
Name |
Description |
| UserCreateModel |
createModel |
The model containing the user creation details.
|
Returns
| Type |
Description |
| Task<IdentityCreationResult> |
A task that resolves to the result of the user creation operation.
|
View Source
CreateForInvite(UserCreateModel)
Creates a user for an invite. This means that the password will not be populated.
Declaration
public Task<IdentityCreationResult> CreateForInvite(UserCreateModel createModel)
Parameters
| Type |
Name |
Description |
| UserCreateModel |
createModel |
The model containing the user creation details.
|
Returns
| Type |
Description |
| Task<IdentityCreationResult> |
A task that resolves to the result of the user creation operation.
|
View Source
GenerateEmailConfirmationTokenAsync(IUser)
Generates an email confirmation token for the specified user.
Declaration
public Task<Attempt<string, UserOperationStatus>> GenerateEmailConfirmationTokenAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to generate the token for.
|
Returns
View Source
GeneratePasswordResetTokenAsync(IUser)
Generates a password reset token for the specified user.
Declaration
public Task<Attempt<string, UserOperationStatus>> GeneratePasswordResetTokenAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to generate the token for.
|
Returns
View Source
GetLoginsAsync(IUser)
Gets all external logins associated with the specified user.
Declaration
public Task<Attempt<ICollection<IIdentityUserLogin>, UserOperationStatus>> GetLoginsAsync(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to get logins for.
|
Returns
View Source
IsEmailConfirmationTokenValidAsync(IUser, string)
Validates whether the email confirmation token is valid for the specified user.
Declaration
public Task<bool> IsEmailConfirmationTokenValidAsync(IUser user, string token)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to validate the token for.
|
| string |
token |
The token to validate.
|
Returns
| Type |
Description |
| Task<bool> |
true if the token is valid; otherwise, false.
|
View Source
IsResetPasswordTokenValidAsync(IUser, string)
Validates whether the password reset token is valid for the specified user.
Declaration
public Task<bool> IsResetPasswordTokenValidAsync(IUser user, string token)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to validate the token for.
|
| string |
token |
The token to validate.
|
Returns
| Type |
Description |
| Task<bool> |
true if the token is valid; otherwise, false.
|
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)
Declaration
public override Task<IdentityResult> ResetAccessFailedCountAsync(BackOfficeIdentityUser user)
Parameters
Returns
| Type |
Description |
| Task<IdentityResult> |
|
View Source
SetLockoutEndDateAsync(BackOfficeIdentityUser, DateTimeOffset?)
Declaration
public override Task<IdentityResult> SetLockoutEndDateAsync(BackOfficeIdentityUser user, DateTimeOffset? lockoutEnd)
Parameters
Returns
| Type |
Description |
| Task<IdentityResult> |
|
View Source
UnlockUser(IUser)
Unlocks the specified user account.
Declaration
public Task<Attempt<UserUnlockResult, UserOperationStatus>> UnlockUser(IUser user)
Parameters
| Type |
Name |
Description |
| IUser |
user |
The user to unlock.
|
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> |
|