public MainResponse ValidateResetPasswordToken(ValidateResetPasswordRequest validateResetPasswordRequest)
        {
            try
            {
                var users = _userRepository.GetSingle(x => x.Email == validateResetPasswordRequest.Email.ToLower() && x.IsActive == true);
                if (users != null)
                {
                    if (users.ResetTokenExpired > DateTime.UtcNow)
                    {
                        _response.Status  = true;
                        _response.Message = Constants.RESET_PASSWORD_VALID_LINK;
                        var userResponse = _mapper.Map <UserResponse>(users);
                        _response.userResponse = userResponse;
                    }
                    else
                    {
                        _response.Status  = false;
                        _response.Message = Constants.RESET_PASSWORD_EXPIRED_LINK;
                    }
                }
            }
            catch (Exception ex)
            {
                _logger.LogError(ex, ex.Message);
                _baseResponse.Status = false;
                _response.Message    = Constants.DEFAULT_ERROR_MSG;
            }

            return(_response);
        }
        public MainResponse ValidateResetPasswordToken(ValidateResetPasswordRequest validateResetPasswordRequest)
        {
            var userDetails = _userRepository.GetSingle(x => x.Email == validateResetPasswordRequest.Email.ToLower() && x.ResetToken == validateResetPasswordRequest.Token && x.ResetTokenExpired > DateTime.UtcNow);

            if (userDetails == null)
            {
                _mainResponse.Message = Constants.RESET_LINK_EXPIRED;
                _mainResponse.Success = false;
            }
            else
            {
                _mainResponse.Success = true;
            }
            return(_mainResponse);
        }
 public IActionResult ValidateResetPasswordToken(ValidateResetPasswordRequest validateResetPasswordRequest)
 {
     _mainResponse = _userService.ValidateResetPasswordToken(validateResetPasswordRequest);
     _jsonString   = Mapper.Convert <BaseResponse>(_mainResponse);
     return(new OkObjectResult(_jsonString));
 }