test(api-keys): add unit tests for tenant API key validation
Introduce unit tests for the tenant API key validation logic, ensuring that scoped keys require capabilities, while full-access keys are validated without them. The tests cover various scenarios, reinforcing the expected behavior of the API key validation function.
This commit is contained in:
@@ -758,6 +758,7 @@ CREATE TABLE IF NOT EXISTS tenant_api_keys (
|
||||
api_key TEXT NOT NULL DEFAULT '',
|
||||
full_access BOOLEAN NOT NULL DEFAULT 0,
|
||||
knowledge_base_ids TEXT NOT NULL DEFAULT '[]',
|
||||
capabilities TEXT NOT NULL DEFAULT '[]',
|
||||
last_used_at DATETIME,
|
||||
expires_at DATETIME,
|
||||
revoked_at DATETIME,
|
||||
|
||||
Reference in New Issue
Block a user