feat: 添加Web验证页面并优化密钥管理功能

This commit is contained in:
yinpeng
2025-02-11 20:45:49 +08:00
parent d1f8a98ad0
commit 8c9b802016
9 changed files with 526 additions and 49 deletions
+3
View File
@@ -1,9 +1,12 @@
from fastapi import HTTPException, Header
from typing import Optional
from app.core.logger import get_security_logger
from app.core.config import settings
logger = get_security_logger()
def verify_auth_token(token: str) -> bool:
return token == settings.AUTH_TOKEN
class SecurityService:
def __init__(self, allowed_tokens: list, auth_token: str):