Add OAuth2/OIDC per-user Gitea authentication
Introduce a GiteaOAuthValidator for JWT and userinfo validation and fallbacks, add /oauth/token proxy, and thread per-user tokens through the request context and automation paths. Update config and .env.example for OAuth-first mode, add OpenAPI, extensive unit/integration tests, GitHub/Gitea CI workflows, docs, and lint/test enforcement (>=80% cov).
This commit is contained in:
@@ -28,6 +28,8 @@ dependencies = [
|
||||
"PyYAML>=6.0.1",
|
||||
"python-dotenv>=1.0.0",
|
||||
"structlog>=24.1.0",
|
||||
"python-multipart>=0.0.9",
|
||||
"PyJWT[crypto]>=2.9.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
@@ -104,7 +106,7 @@ disallow_untyped_defs = false
|
||||
|
||||
[tool.pytest.ini_options]
|
||||
minversion = "7.0"
|
||||
addopts = "-ra -q --strict-markers --cov=aegis_gitea_mcp --cov-report=term-missing"
|
||||
addopts = "-ra -q --strict-markers --cov=aegis_gitea_mcp --cov-report=term-missing --cov-fail-under=80"
|
||||
testpaths = ["tests"]
|
||||
pythonpath = ["src"]
|
||||
asyncio_mode = "auto"
|
||||
@@ -114,6 +116,7 @@ source = ["src"]
|
||||
omit = ["tests/*", "**/__pycache__/*"]
|
||||
|
||||
[tool.coverage.report]
|
||||
fail_under = 80
|
||||
exclude_lines = [
|
||||
"pragma: no cover",
|
||||
"def __repr__",
|
||||
|
||||
Reference in New Issue
Block a user