code: func (api UsersAPI) GetTwoFAMethods(w http.ResponseWriter, r *http.Request) {
  	username := mux.Vars(r)["username"]
  	userMgr := user.NewManager(r)
  	userFromDB, err := userMgr.GetByName(username)
  	if err != nil {
  		log.Error(err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  
  	response := struct {
  		Totp bool               `json:"totp"`
  		Sms  []user.Phonenumber `json:"sms"`
  	}{}
  	totpMgr := totp.NewManager(r)
  	response.Totp, err = totpMgr.HasTOTP(username)
  	if err != nil {
  		log.Error(err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	valMgr := validationdb.NewManager(r)
  	verifiedPhones, err := valMgr.GetByUsernameValidatedPhonenumbers(username)
  	if err != nil {
  		log.Error(err)
  		http.Error(w, http.StatusText(http.StatusInternalServerError), http.StatusInternalServerError)
  		return
  	}
  	for _, validatedPhoneNumber := range verifiedPhones {
  		for _, number := range userFromDB.Phonenumbers {
  			if number.Phonenumber == string(validatedPhoneNumber.Phonenumber) {
  				response.Sms = append(response.Sms, number)
  			}
  		}
  	}
  	json.NewEncoder(w).Encode(response)
  	w.WriteHeader(http.StatusOK)
  	return
  }
docs: // GetTwoFAMethods is the handler for GET /users/{username}/twofamethods
  // Get the possible two factor authentication methods