feat: serve docs flat at /<repo>/ with no redirects

- collect.py copies each repo's built site contents directly to a
  top-level <repo>/ dir (was libs|apis|wiki/<repo>/site nesting)
- nginx uses `index index.html lib/index.html api/index.html` so
  /dagpipe/ -> lib/index.html, /auth-server/ -> api/index.html are
  served internally with no redirects
- _index regenerates links against the flat layout
  (/dagpipe/lib/, /auth-server/api/, /mongo-ops/, /blog/...)
- config.yml static entries point at vendored blog/ + media-manager/
- Dockerfile copies per-repo dirs flat into the nginx html root
- removed stale libs/, apis/, wiki/, tutorials/ category trees
This commit is contained in:
2026-09-11 21:32:30 +05:30
parent 0c25cbb19f
commit a32eeaf2b4
882 changed files with 85 additions and 1982 deletions

View File

@@ -0,0 +1,116 @@
{
"module": "jwtlib.introspection",
"content": {
"path": "jwtlib.introspection",
"docstring": "Auth client and access-control utilities.\n\n---\n\n## Summary\n\nThis module provides **pure authentication and authorization logic**\nfor validating JWTs via service-to-service introspection and resolving\nauthenticated users.\n\nNotes:\n **Responsibilities:**\n\n - Calling the auth service introspection endpoint\n - Translating introspection responses into typed user models\n - Enforcing access control decisions at the logic layer\n\n **Constraints:**\n\n - This module intentionally does NOT: Parse HTTP requests or headers, implement authentication policies, or perform JWT signature verification locally.",
"objects": {
"os": {
"name": "os",
"kind": "alias",
"path": "jwtlib.introspection.os",
"signature": "<bound method Alias.signature of Alias('os', 'os')>",
"docstring": null
},
"Callable": {
"name": "Callable",
"kind": "alias",
"path": "jwtlib.introspection.Callable",
"signature": "<bound method Alias.signature of Alias('Callable', 'collections.abc.Callable')>",
"docstring": null
},
"Any": {
"name": "Any",
"kind": "alias",
"path": "jwtlib.introspection.Any",
"signature": "<bound method Alias.signature of Alias('Any', 'typing.Any')>",
"docstring": null
},
"httpx": {
"name": "httpx",
"kind": "alias",
"path": "jwtlib.introspection.httpx",
"signature": "<bound method Alias.signature of Alias('httpx', 'httpx')>",
"docstring": null
},
"AuthServiceUnavailable": {
"name": "AuthServiceUnavailable",
"kind": "class",
"path": "jwtlib.introspection.AuthServiceUnavailable",
"signature": "<bound method Alias.signature of Alias('AuthServiceUnavailable', 'jwtlib.exceptions.AuthServiceUnavailable')>",
"docstring": "Raised when the authentication service cannot be reached.\n\nNotes:\n **Guarantees:**\n\n - Indicates a network failure, timeout, or unexpected error while\n communicating with the auth service."
},
"InvalidToken": {
"name": "InvalidToken",
"kind": "class",
"path": "jwtlib.introspection.InvalidToken",
"signature": "<bound method Alias.signature of Alias('InvalidToken', 'jwtlib.exceptions.InvalidToken')>",
"docstring": "Raised when a `JWT` is missing, malformed, expired, or invalid.\n\nNotes:\n **Guarantees:**\n\n - This error indicates that the provided token cannot be used to\n authenticate a request."
},
"PublicUser": {
"name": "PublicUser",
"kind": "class",
"path": "jwtlib.introspection.PublicUser",
"signature": "<bound method Alias.signature of Alias('PublicUser', 'jwtlib.models.PublicUser')>",
"docstring": "Public-facing user representation returned by authentication APIs.\n\nAttributes:\n username (str):\n Unique username identifier.\n email (EmailStr, optional):\n User's email address.\n is_active (bool):\n Whether the user account is active.",
"members": {
"model_config": {
"name": "model_config",
"kind": "attribute",
"path": "jwtlib.introspection.PublicUser.model_config",
"signature": "<bound method Alias.signature of Alias('model_config', 'jwtlib.models.app.PublicUser.model_config')>",
"docstring": null
},
"username": {
"name": "username",
"kind": "attribute",
"path": "jwtlib.introspection.PublicUser.username",
"signature": "<bound method Alias.signature of Alias('username', 'jwtlib.models.app.PublicUser.username')>",
"docstring": null
},
"email": {
"name": "email",
"kind": "attribute",
"path": "jwtlib.introspection.PublicUser.email",
"signature": "<bound method Alias.signature of Alias('email', 'jwtlib.models.app.PublicUser.email')>",
"docstring": null
},
"is_active": {
"name": "is_active",
"kind": "attribute",
"path": "jwtlib.introspection.PublicUser.is_active",
"signature": "<bound method Alias.signature of Alias('is_active', 'jwtlib.models.app.PublicUser.is_active')>",
"docstring": null
}
}
},
"JWT_SERVER": {
"name": "JWT_SERVER",
"kind": "attribute",
"path": "jwtlib.introspection.JWT_SERVER",
"signature": null,
"docstring": null
},
"INTROSPECTION_URL": {
"name": "INTROSPECTION_URL",
"kind": "attribute",
"path": "jwtlib.introspection.INTROSPECTION_URL",
"signature": null,
"docstring": null
},
"introspect_token": {
"name": "introspect_token",
"kind": "function",
"path": "jwtlib.introspection.introspect_token",
"signature": "<bound method Function.signature of Function('introspect_token', 50, 94)>",
"docstring": "Introspect a JWT using the external authentication service.\n\nArgs:\n token (str):\n JWT access token to introspect.\n\nReturns:\n dict[str, Any]:\n A dictionary containing the authenticated user's public payload.\n\nRaises:\n InvalidToken:\n If the token is missing, invalid, inactive, or revoked.\n AuthServiceUnavailable:\n If the auth service cannot be reached or fails unexpectedly.\n\nNotes:\n **Guarantees:**\n\n - This function treats the auth service as the source of truth. No local JWT validation or signature checking is performed here. The returned payload is expected to be safe for public exposure."
},
"authenticate_request": {
"name": "authenticate_request",
"kind": "function",
"path": "jwtlib.introspection.authenticate_request",
"signature": "<bound method Function.signature of Function('authenticate_request', 102, 147)>",
"docstring": "Authenticate an incoming request using token introspection.\n\nArgs:\n should_skip_authentication (Callable[[str, str], bool]):\n Callable that decides whether authentication is required for a given HTTP method and path.\n method (str):\n HTTP method of the incoming request.\n path (str):\n Request path.\n authorization_token (str | None):\n JWT access token provided by the caller.\n\nReturns:\n PublicUser | None:\n PublicUser if authentication succeeds; None if authentication is skipped.\n\nRaises:\n InvalidToken:\n If authentication is required but the token is missing, invalid, or revoked.\n AuthServiceUnavailable:\n If the auth service cannot be reached.\n\nNotes:\n **Responsibilities:**\n\n - Determines whether authentication should be skipped for the given request context and, if not, resolves the authenticated user via token introspection\n\n **Guarantees:**\n\n - This function does not parse Authorization headers; callers must supply the raw token. Access-control policy is externalized via `should_skip_authentication`."
}
}
}
}