feat: support upstream token refresh

This commit is contained in:
liumangmang
2026-06-30 14:34:40 +08:00
parent 2d1dcb8f9f
commit c5bb63cf82
15 changed files with 895 additions and 140 deletions
+1 -1
View File
@@ -12,7 +12,7 @@ class Upstream(Base):
name: Mapped[str] = mapped_column(String(255), nullable=False)
base_url: Mapped[str] = mapped_column(String(512), nullable=False)
api_prefix: Mapped[str] = mapped_column(String(128), default="/api/v1")
# none | bearer | api_key | login_password
# none | bearer | new_api_token | nox_token | api_key | cookie | login_password
auth_type: Mapped[str] = mapped_column(String(32), default="login_password")
# JSON: {"email":"..","password":".."} or {"token":".."} etc.
auth_config_json: Mapped[str] = mapped_column(Text, default="{}")