Class BackOfficePasswordChanger
Provides functionality to change the back office user's password.
Inheritance
Namespace: Umbraco.Cms.Api.Management.Security
Assembly: Umbraco.Cms.Api.Management.dll
Syntax
public class BackOfficePasswordChanger : IBackOfficePasswordChanger
Constructors
View SourceBackOfficePasswordChanger(IPasswordChanger<BackOfficeIdentityUser>, IBackOfficeUserManager)
Initializes a new instance of the BackOfficePasswordChanger class.
Declaration
public BackOfficePasswordChanger(IPasswordChanger<BackOfficeIdentityUser> passwordChanger, IBackOfficeUserManager userManager)
Parameters
| Type | Name | Description |
|---|---|---|
| IPasswordChanger<BackOfficeIdentityUser> | passwordChanger | An implementation for changing passwords of BackOfficeIdentityUser instances. |
| IBackOfficeUserManager | userManager | The user manager responsible for managing back office users. |
Methods
View SourceChangeBackOfficePassword(ChangeBackOfficeUserPasswordModel, IUser?)
Asynchronously changes the password for a specified back office user.
Declaration
public Task<Attempt<PasswordChangedModel?>> ChangeBackOfficePassword(ChangeBackOfficeUserPasswordModel model, IUser? performingUser)
Parameters
| Type | Name | Description |
|---|---|---|
| ChangeBackOfficeUserPasswordModel | model | A ChangeBackOfficeUserPasswordModel containing the user identifier and password change details (old password, new password, and optional reset token). |
| IUser | performingUser | The IUser instance representing the user performing the password change, or |
Returns
| Type | Description |
|---|---|
| Task<Attempt<PasswordChangedModel>> | A System.Threading.Tasks.Task<TResult> representing the asynchronous operation. The result is an Attempt<TResult> containing a PasswordChangedModel if the password change was successful; otherwise, the attempt indicates failure. |