mirror of
https://github.com/RaisFast/raisfast.git
synced 2026-10-09 08:02:46 +00:00
feat: complete integration oauth egress
This commit is contained in:
@@ -1198,6 +1198,23 @@ CREATE TABLE IF NOT EXISTS itg_api_clients (
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_itg_api_clients_tenant ON itg_api_clients(tenant_id);
|
||||
|
||||
-- OAuth2 authorization-code tokens (oauth2-egress.md §2): one row per
|
||||
-- (api-client, tenant); access/refresh tokens are vault-sealed.
|
||||
CREATE TABLE IF NOT EXISTS itg_oauth_tokens (
|
||||
id INTEGER PRIMARY KEY,
|
||||
client_key TEXT NOT NULL,
|
||||
tenant_id TEXT NOT NULL DEFAULT 'default',
|
||||
access_token TEXT,
|
||||
refresh_token TEXT,
|
||||
expires_at TEXT,
|
||||
scope TEXT,
|
||||
created_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ','now')),
|
||||
updated_at TEXT NOT NULL DEFAULT (strftime('%Y-%m-%dT%H:%M:%SZ','now')),
|
||||
UNIQUE (client_key, tenant_id)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_itg_oauth_tokens_tenant ON itg_oauth_tokens(tenant_id);
|
||||
|
||||
-- Full outbound call log (integration.md §10.7: trace_id = itg_receipts.id)
|
||||
CREATE TABLE IF NOT EXISTS itg_egress_log (
|
||||
id INTEGER PRIMARY KEY,
|
||||
|
||||
Reference in New Issue
Block a user