mirror of
https://github.com/DarkflameUniverse/DarkflameServer.git
synced 2026-10-02 10:53:44 +00:00
feat(database): dashboard_api_keys table
Hashed API keys with scope, restrictions, limits, expiry and batched usage counters, for MySQL and SQLite, with test stubs and parity tests. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -219,6 +219,16 @@ public:
|
||||
void InsertTrafficMinutes(const std::vector<TrafficMinute>& minutes) override;
|
||||
std::vector<TrafficMinute> GetTrafficMinutes(int64_t from, int64_t to, int64_t bucketSeconds) override;
|
||||
uint32_t PruneTrafficMinutes(int64_t beforeTime) override;
|
||||
|
||||
// IApiKeys
|
||||
uint64_t InsertApiKey(const ApiKey& key) override;
|
||||
std::optional<ApiKey> GetApiKey(uint64_t id) override;
|
||||
std::optional<ApiKey> GetApiKeyByHash(const std::string& keyHash) override;
|
||||
std::vector<ApiKey> GetApiKeys(uint32_t accountId) override;
|
||||
void RevokeApiKey(uint64_t id, const std::string& revokedBy, int64_t time) override;
|
||||
uint32_t RevokeAccountApiKeys(uint32_t accountId, const std::string& revokedBy, int64_t time) override;
|
||||
void RotateApiKey(uint64_t id, const std::string& keyHash, const std::string& keyPrefix, int64_t issuedAt) override;
|
||||
void RecordApiKeyUsage(const std::vector<ApiKeyUsage>& usage) override;
|
||||
// IBbbAutosave
|
||||
std::optional<IBbbAutosave::Info> GetBbbAutosave(const LWOOBJID characterId) override;
|
||||
void SetBbbAutosave(const LWOOBJID characterId, const IBbbAutosave::Info& info) override;
|
||||
|
||||
Reference in New Issue
Block a user