Remove API key requirement
This commit is contained in:
@@ -24,14 +24,9 @@ struct HttpResponse {
|
||||
bool transportOk = false; // true when the request completed without a transport error
|
||||
};
|
||||
|
||||
// Performs a GET/POST against `path` (relative to API_BASE_URL). When `apiKey` is
|
||||
// non-empty it is sent as `Authorization: Bearer <apiKey>`. When it is empty (or
|
||||
// omitted) the request falls back to the key baked in at build time via the
|
||||
// `API_KEY` compile definition (see CMakeLists.txt); with neither set, no auth
|
||||
// header is sent.
|
||||
HttpResponse httpGet(const std::string& path, const std::string& apiKey = "");
|
||||
HttpResponse httpPost(const std::string& path, const std::string& jsonBody,
|
||||
const std::string& apiKey = "");
|
||||
// Performs a GET/POST against `path` (relative to API_BASE_URL).
|
||||
HttpResponse httpGet(const std::string& path);
|
||||
HttpResponse httpPost(const std::string& path, const std::string& jsonBody);
|
||||
|
||||
// ─── GET /frequencies ──────────────────────────────────────────────────
|
||||
|
||||
@@ -45,7 +40,7 @@ struct Frequency {
|
||||
bool parseFrequenciesJson(const std::string& body, std::vector<Frequency>& out);
|
||||
|
||||
// Fetch the solfeggio frequencies. Returns true only on HTTP 2xx + successful parse.
|
||||
bool fetchFrequencies(std::vector<Frequency>& out, const std::string& apiKey = "");
|
||||
bool fetchFrequencies(std::vector<Frequency>& out);
|
||||
|
||||
// ─── GET /color-palettes ───────────────────────────────────────────────
|
||||
|
||||
@@ -75,7 +70,7 @@ bool parseColorPalettesJson(const std::string& body, std::vector<ColorPalette>&
|
||||
// NOTE: the portal does not expose this route yet. This is readiness code — it
|
||||
// is deliberately not called anywhere in the app until the route ships, so
|
||||
// palettes can be updated from the portal rather than code releases.
|
||||
bool fetchColorPalettes(std::vector<ColorPalette>& out, const std::string& apiKey = "");
|
||||
bool fetchColorPalettes(std::vector<ColorPalette>& out);
|
||||
|
||||
// ─── POST /license ─────────────────────────────────────────────────────
|
||||
|
||||
@@ -98,8 +93,7 @@ struct LicenseResult {
|
||||
// Validate a license key / email pair against the portal. Never throws; failures
|
||||
// (network, HTTP error status) are reported through the returned LicenseResult.
|
||||
// A 2xx response means the license is valid and the subscription is active.
|
||||
LicenseResult validateLicense(const std::string& key, const std::string& email,
|
||||
const std::string& apiKey = "");
|
||||
LicenseResult validateLicense(const std::string& key, const std::string& email);
|
||||
|
||||
// ─── POST /automations/create/account ──────────────────────────────────
|
||||
|
||||
@@ -122,7 +116,6 @@ struct AccountResult {
|
||||
|
||||
// Creates (or reuses) a user account and issues a license key. The key is emailed
|
||||
// to the user and is NOT part of the response. `name` may be empty.
|
||||
AccountResult createAccount(const std::string& email, const std::string& name = "",
|
||||
const std::string& apiKey = "");
|
||||
AccountResult createAccount(const std::string& email, const std::string& name = "");
|
||||
|
||||
} // namespace radiantwave::api
|
||||
|
||||
Reference in New Issue
Block a user