e8ffc5e45bd8e8de9f1c78347ea6b11fd4817a40
chmalee
  Mon Dec 2 12:37:53 2024 -0800
Generate api keys for each user and store them in hgcentral.hubSpaceKeys

diff --git src/hg/hgHubConnect/hgHubConnect.h src/hg/hgHubConnect/hgHubConnect.h
index b4701d9..65d49b8 100644
--- src/hg/hgHubConnect/hgHubConnect.h
+++ src/hg/hgHubConnect/hgHubConnect.h
@@ -1,35 +1,43 @@
 /* hgHubConnect - User interfaces for connecting and managing track hubs */
 
 /* Copyright (C) 2008 The Regents of the University of California 
  * See kent/LICENSE or http://genome.ucsc.edu/license/ for licensing information. */
 
 #ifndef HGHUBCONNECT_H
 #define HGHUBCONNECT_H
 
 #include "cart.h"
 #include "cartJson.h"
 
 //extern struct cart *cart;	/* This holds cgi and other variables between clicks. */
 
 // the variables for various track hub wizard methods:
 #define hgHubDeleteFile "deleteFile"
 #define hgHubCreateHub "createHub"
 #define hgHubEditHub "editHub"
 #define hgHubMoveFile "moveFile"
+#define hgHubGenerateApiKey "generateApiKey"
+#define hgHubRevokeApiKey "revokeApiKey"
+
+void revokeApiKey(struct cartJson *cj, struct hash *paramHash);
+/* Remove any api keys for the user */
+
+void generateApiKey(struct cartJson *cj, struct hash *paramHash);
+/* Make a random (but not crypto-secure api key for use of hubtools to upload to hubspace */
 
 void doRemoveFile(struct cartJson *cj, struct hash *paramHash);
 /* Process the request to remove a file */
 
 void doMoveFile(struct cartJson *cj, struct hash *paramHash);
 /* Move a file to a new hub */
 
 void doCreateHub(struct cartJson *cj, struct hash *paramHash);
 /* Make a new hub.txt with the parameters from the JSON request */
 
 void doEditHub(struct cartJson *cj, struct hash *paramHash);
 /* Edit the hub.txt for a hub */
 
 void doTrackHubWizard(char *database);
 /* Print out the html to allow a user to upload some files from their machine to us */
 
 #endif /* HGHUBCONNECT_H */