public ServiceResponseDTO <CurrentUserDTO> Put([FromBody] UpdatePasswordDTO updatePwdDto) { var response = new ServiceResponseDTO <CurrentUserDTO>(); try { response = _authenticationSvc.Authenticate(updatePwdDto.UserName, updatePwdDto.CurrentPassword); if (response.Success) { _userService.UpdateUserPassword(updatePwdDto.UserName, updatePwdDto.NewPassword); } } catch (Exception e) { response.Success = false; response.Errors.Add(e.Message); } return(response); }
public ServiceResponseDTO <CurrentUserDTO> Post([FromBody] UserCredentialDTO data) { return(_authenticationSvc.Authenticate(data.Username, data.Password)); }