Owneat Technical Guide main Help

Class ChangePasswordCommandHandler

Namespace: Identity.Application.Requests.Handlers.User
Assembly: Identity.Application.dll

Handler that checks previous and new password matching before updating the password.

public sealed class ChangePasswordCommandHandler : IRequestHandler<ChangePasswordCommand, Result<PasswordChangedDto>>

Inheritance

object ← ChangePasswordCommandHandler

Implements

IRequestHandler<ChangePasswordCommand, Result<PasswordChangedDto\>\>

Inherited Members

object.Equals\(object?\), object.Equals\(object?, object?\), object.GetHashCode\(\), object.GetType\(\), object.ReferenceEquals\(object?, object?\), object.ToString\(\)

Constructors

ChangePasswordCommandHandler\(IUserRepository, IUnitOfWork, IPasswordHasher<User\>, IAuthorizationService, IHttpContextAccessor\)

public ChangePasswordCommandHandler(IUserRepository repository, IUnitOfWork unitOfWork, IPasswordHasher<User> passwordHasher, IAuthorizationService authorizationService, IHttpContextAccessor httpContextAccessor)

Parameters

repository IUserRepository

unitOfWork IUnitOfWork

passwordHasher IPasswordHasher < User \>

authorizationService IAuthorizationService

httpContextAccessor IHttpContextAccessor

Methods

Handle\(ChangePasswordCommand, CancellationToken\)

Handles a request

public Task<Result<PasswordChangedDto>> Handle(ChangePasswordCommand request, CancellationToken cancellationToken)

Parameters

request ChangePasswordCommand

The request

cancellationToken CancellationToken

Cancellation token

Returns

Task <Result< PasswordChangedDto \>\>

Response from the request

Last modified: 21 May 2024