Some checks failed
CI / lint-and-test (push) Has been cancelled
- Cache Graph API tokens with expiry-aware reuse in graph/auth.py - Add tenacity-based retry/backoff wrapper (utils/http.py) and apply to all Graph/source API calls - Add Pydantic request/response models (models/api.py) and FastAPI query constraints - Add unit tests for event_model, auth and integration tests for API endpoints - Configure ruff linter/formatter in pyproject.toml - Add GitHub Actions CI pipeline (.github/workflows/ci.yml) - Add requirements-dev.txt with pytest, mongomock, httpx, ruff - Clean up typing imports and fix ruff linting across codebase
21 lines
439 B
Python
21 lines
439 B
Python
from config import (
|
|
AUTH_CLIENT_ID,
|
|
AUTH_ENABLED,
|
|
AUTH_SCOPE,
|
|
AUTH_TENANT_ID,
|
|
)
|
|
from fastapi import APIRouter
|
|
|
|
router = APIRouter()
|
|
|
|
|
|
@router.get("/config/auth")
|
|
def auth_config():
|
|
return {
|
|
"auth_enabled": AUTH_ENABLED,
|
|
"tenant_id": AUTH_TENANT_ID,
|
|
"client_id": AUTH_CLIENT_ID,
|
|
"scope": AUTH_SCOPE,
|
|
"redirect_uri": None, # frontend uses window.location.origin by default
|
|
}
|