feat: add authentication for OSS (#167)

* feat: add authentication for OSS

Fixes #157 and #156

* fix: fix token generation

* fix: limit fastapi workers to 1
This commit is contained in:
Abhishek 2026-02-20 18:21:24 +05:30 committed by GitHub
parent 0791975864
commit 642cc34e8c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
48 changed files with 994 additions and 303 deletions

View file

@ -2,6 +2,7 @@ from fastapi import APIRouter
from loguru import logger
from pydantic import BaseModel
from api.routes.auth import router as auth_router
from api.routes.campaign import router as campaign_router
from api.routes.credentials import router as credentials_router
from api.routes.integration import router as integration_router
@ -50,17 +51,20 @@ router.include_router(public_agent_router)
router.include_router(public_download_router)
router.include_router(workflow_embed_router)
router.include_router(knowledge_base_router)
router.include_router(auth_router)
class HealthResponse(BaseModel):
status: str
version: str
backend_api_endpoint: str
deployment_mode: str
auth_provider: str
@router.get("/health", response_model=HealthResponse)
async def health() -> HealthResponse:
from api.constants import APP_VERSION
from api.constants import APP_VERSION, AUTH_PROVIDER, DEPLOYMENT_MODE
from api.utils.common import get_backend_endpoints
logger.debug("Health endpoint called")
@ -69,4 +73,6 @@ async def health() -> HealthResponse:
status="ok",
version=APP_VERSION,
backend_api_endpoint=backend_endpoint,
deployment_mode=DEPLOYMENT_MODE,
auth_provider=AUTH_PROVIDER,
)