取消AUTH_DISABLED参数

This commit is contained in:
2026-02-24 10:45:53 +08:00
parent 780a48d927
commit 020432ad0e
8 changed files with 8 additions and 28 deletions

View File

@@ -14,8 +14,6 @@ oauth2_optional = OAuth2PasswordBearer(
async def get_current_keycloak_sub(
token: str | None = Depends(oauth2_optional),
) -> UUID:
if settings.AUTH_DISABLED:
return UUID(int=0)
if not token:
raise HTTPException(
status_code=status.HTTP_401_UNAUTHORIZED,