func listKeys(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	u, err := auth.ConvertNewUser(t.User())
	if err != nil {
		return err
	}
	keys, err := u.ListKeys()
	if err == authTypes.ErrKeyDisabled {
		return &errors.HTTP{Code: http.StatusBadRequest, Message: err.Error()}
	}
	if err != nil {
		return err
	}
	w.Header().Add("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(keys)
}
func listKeys(w http.ResponseWriter, r *http.Request, t auth.Token) error {
	u, err := auth.ConvertNewUser(t.User())
	if err != nil {
		return err
	}
	keys, err := u.ListKeys()
	if err == authTypes.ErrKeyDisabled {
		return &errors.HTTP{Code: http.StatusBadRequest, Message: err.Error()}
	}
	if err != nil {
		return err
	}
	w.Header().Add("Content-Type", "application/json")
	return json.NewEncoder(w).Encode(keys)
}
// title: list keys
// path: /users/keys
// method: GET
// produce: application/json
// responses:
//   200: OK
//   400: Invalid data
//   401: Unauthorized