code: func (service *Service) ResetPassword(w http.ResponseWriter, request *http.Request) {
  	values := struct {
  		Token    string `json:"token"`
  		Password string `json:"password"`
  	}{}
  
  	if err := json.NewDecoder(request.Body).Decode(&values); err != nil {
  		log.Debug("Error decoding the ResetPassword request:", err)
  		http.Error(w, http.StatusText(http.StatusBadRequest), http.StatusBadRequest)
  		return
  	}
  	pwdMngr := password.NewManager(request)
  	token, err := pwdMngr.FindResetToken(values.Token)
  	if err != nil {
  		log.Debug("Failed to find password reset token - ", err)
  		http.Error(w, http.StatusText(http.StatusNotFound), http.StatusNotFound)
  		return
  	}
  	err = pwdMngr.Save(token.Username, values.Password)
  	if err != nil {
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	if err = pwdMngr.DeleteResetToken(values.Token); err != nil {
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  
  	}
  	w.WriteHeader(http.StatusNoContent)
  	return
  }
docs: //ResetPassword handler for POST /login/resetpassword