integrate sub2api as upstream for auth/keys/usage via FastAPI BFF
Preserve local user table for superDream-specific features while syncing user lifecycle, API key CRUD and usage queries through sub2api. Admin token handles reads and user lifecycle; per-user tokens (Fernet-encrypted in DB) handle key writes that admin endpoints do not expose. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
18
app/integrations/sub2api/__init__.py
Normal file
18
app/integrations/sub2api/__init__.py
Normal file
@@ -0,0 +1,18 @@
|
||||
from app.integrations.sub2api.client import (
|
||||
Sub2APIError,
|
||||
Sub2APIReauthRequired,
|
||||
Sub2APITransportError,
|
||||
get_client,
|
||||
close_client,
|
||||
)
|
||||
from app.integrations.sub2api import admin, user
|
||||
|
||||
__all__ = [
|
||||
"Sub2APIError",
|
||||
"Sub2APIReauthRequired",
|
||||
"Sub2APITransportError",
|
||||
"get_client",
|
||||
"close_client",
|
||||
"admin",
|
||||
"user",
|
||||
]
|
||||
Reference in New Issue
Block a user