docs: refresh collected sites and MCP bundles after GSDFC docstring conformance

This commit is contained in:
2026-09-13 16:24:16 +05:30
parent 754255166f
commit e272527b88
466 changed files with 146669 additions and 1762 deletions

View File

@@ -252,21 +252,21 @@
"kind": "function",
"path": "jwtlib.app.UserRepository.get_by_username",
"signature": "<bound method Alias.signature of Alias('get_by_username', 'jwtlib.repository.UserRepository.get_by_username')>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.app.UserRepository.get_by_email",
"signature": "<bound method Alias.signature of Alias('get_by_email', 'jwtlib.repository.UserRepository.get_by_email')>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.app.UserRepository.get_active_users",
"signature": "<bound method Alias.signature of Alias('get_active_users', 'jwtlib.repository.UserRepository.get_active_users')>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",
@@ -282,7 +282,7 @@
"kind": "function",
"path": "jwtlib.app.get_current_user",
"signature": "<bound method Alias.signature of Alias('get_current_user', 'jwtlib.utils.get_current_user')>",
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository, optional):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository | None):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
},
"get_user_repository": {
"name": "get_user_repository",
@@ -303,21 +303,21 @@
"kind": "function",
"path": "jwtlib.app.register_user",
"signature": "<bound method Function.signature of Function('register_user', 52, 72)>",
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
},
"login_user": {
"name": "login_user",
"kind": "function",
"path": "jwtlib.app.login_user",
"signature": "<bound method Function.signature of Function('login_user', 75, 105)>",
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
},
"get_logged_in_user": {
"name": "get_logged_in_user",
"kind": "function",
"path": "jwtlib.app.get_logged_in_user",
"signature": "<bound method Function.signature of Function('get_logged_in_user', 108, 134)>",
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
},
"logout_user": {
"name": "logout_user",
@@ -331,7 +331,7 @@
"kind": "function",
"path": "jwtlib.app.introspect_token",
"signature": "<bound method Function.signature of Function('introspect_token', 163, 207)>",
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
}
}
}

View File

@@ -2,7 +2,7 @@
"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.",
"docstring": "# Summary\n\nAuth client and access-control utilities.\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",
@@ -101,14 +101,14 @@
"name": "introspect_token",
"kind": "function",
"path": "jwtlib.introspection.introspect_token",
"signature": "<bound method Function.signature of Function('introspect_token', 50, 94)>",
"signature": "<bound method Function.signature of Function('introspect_token', 48, 92)>",
"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)>",
"signature": "<bound method Function.signature of Function('authenticate_request', 100, 145)>",
"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`."
}
}

View File

@@ -286,21 +286,21 @@
"kind": "function",
"path": "jwtlib.register_user",
"signature": "<bound method Alias.signature of Alias('register_user', 'jwtlib.app.register_user')>",
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
},
"login_user": {
"name": "login_user",
"kind": "function",
"path": "jwtlib.login_user",
"signature": "<bound method Alias.signature of Alias('login_user', 'jwtlib.app.login_user')>",
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
},
"get_logged_in_user": {
"name": "get_logged_in_user",
"kind": "function",
"path": "jwtlib.get_logged_in_user",
"signature": "<bound method Alias.signature of Alias('get_logged_in_user', 'jwtlib.app.get_logged_in_user')>",
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
},
"logout_user": {
"name": "logout_user",
@@ -314,7 +314,7 @@
"kind": "function",
"path": "jwtlib.introspect_token",
"signature": "<bound method Alias.signature of Alias('introspect_token', 'jwtlib.app.introspect_token')>",
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
},
"authenticate_request": {
"name": "authenticate_request",
@@ -599,21 +599,21 @@
"kind": "function",
"path": "jwtlib.app.UserRepository.get_by_username",
"signature": "<bound method Alias.signature of Alias('get_by_username', 'jwtlib.repository.UserRepository.get_by_username')>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.app.UserRepository.get_by_email",
"signature": "<bound method Alias.signature of Alias('get_by_email', 'jwtlib.repository.UserRepository.get_by_email')>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.app.UserRepository.get_active_users",
"signature": "<bound method Alias.signature of Alias('get_active_users', 'jwtlib.repository.UserRepository.get_active_users')>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",
@@ -629,7 +629,7 @@
"kind": "function",
"path": "jwtlib.app.get_current_user",
"signature": "<bound method Alias.signature of Alias('get_current_user', 'jwtlib.utils.get_current_user')>",
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository, optional):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository | None):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
},
"get_user_repository": {
"name": "get_user_repository",
@@ -650,21 +650,21 @@
"kind": "function",
"path": "jwtlib.app.register_user",
"signature": "<bound method Function.signature of Function('register_user', 52, 72)>",
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
"docstring": "Register a new user.\n\nArgs:\n user (RegisterRequest):\n Registration payload containing username, email, and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The newly created user as a public user representation."
},
"login_user": {
"name": "login_user",
"kind": "function",
"path": "jwtlib.app.login_user",
"signature": "<bound method Function.signature of Function('login_user', 75, 105)>",
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
"docstring": "Authenticate a user and issue an access token.\n\nArgs:\n user (LoginRequest):\n Login payload containing username and password.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n LoginResponse:\n `LoginResponse` containing the issued access token and related\n metadata.\n\nRaises:\n AuthError:\n If the credentials are invalid."
},
"get_logged_in_user": {
"name": "get_logged_in_user",
"kind": "function",
"path": "jwtlib.app.get_logged_in_user",
"signature": "<bound method Function.signature of Function('get_logged_in_user', 108, 134)>",
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
"docstring": "Resolve the currently authenticated user from a `JWT`.\n\nArgs:\n token (str):\n `JWT` access token.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n PublicUser:\n The authenticated user as a `PublicUser`.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n AuthError:\n If the token is valid, but the user cannot be resolved."
},
"logout_user": {
"name": "logout_user",
@@ -678,7 +678,7 @@
"kind": "function",
"path": "jwtlib.app.introspect_token",
"signature": "<bound method Function.signature of Function('introspect_token', 163, 207)>",
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository, optional):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
"docstring": "Introspect a `JWT` for service-to-service authentication.\n\nArgs:\n token (str):\n `JWT` access token to introspect.\n repo (UserRepository | None):\n Optional user repository instance. If not provided, a default\n repository is obtained via dependency utilities.\n\nReturns:\n IntrospectResponse:\n `IntrospectResponse` indicating valid token with user, invalid\n token, or valid token with no user.\n\nNotes:\n **Responsibilities:**\n\n - Validate the provided token and resolve the associated user,\n returning a structured introspection response suitable for\n internal service use.\n\n **Guarantees:**\n\n - This function never raises authentication exceptions. Instead, it\n returns a typed response indicating token validity and user\n presence."
}
}
},
@@ -738,7 +738,7 @@
"kind": "module",
"path": "jwtlib.introspection",
"signature": null,
"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.",
"docstring": "# Summary\n\nAuth client and access-control utilities.\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.",
"members": {
"os": {
"name": "os",
@@ -837,14 +837,14 @@
"name": "introspect_token",
"kind": "function",
"path": "jwtlib.introspection.introspect_token",
"signature": "<bound method Function.signature of Function('introspect_token', 50, 94)>",
"signature": "<bound method Function.signature of Function('introspect_token', 48, 92)>",
"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)>",
"signature": "<bound method Function.signature of Function('authenticate_request', 100, 145)>",
"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`."
}
}
@@ -988,7 +988,7 @@
"kind": "function",
"path": "jwtlib.repository.create_access_token",
"signature": "<bound method Alias.signature of Alias('create_access_token', 'jwtlib.security.create_access_token')>",
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta, optional):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta | None):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
},
"hash_password": {
"name": "hash_password",
@@ -1023,21 +1023,21 @@
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_by_username",
"signature": "<bound method Function.signature of Function('get_by_username', 54, 67)>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_by_email",
"signature": "<bound method Function.signature of Function('get_by_email', 69, 82)>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_active_users",
"signature": "<bound method Function.signature of Function('get_active_users', 84, 98)>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",
@@ -1169,7 +1169,7 @@
"kind": "function",
"path": "jwtlib.security.create_access_token",
"signature": "<bound method Function.signature of Function('create_access_token', 64, 86)>",
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta, optional):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta | None):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
},
"get_jwt_payload": {
"name": "get_jwt_payload",
@@ -1287,21 +1287,21 @@
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_by_username",
"signature": "<bound method Alias.signature of Alias('get_by_username', 'jwtlib.repository.UserRepository.get_by_username')>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_by_email",
"signature": "<bound method Alias.signature of Alias('get_by_email', 'jwtlib.repository.UserRepository.get_by_email')>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_active_users",
"signature": "<bound method Alias.signature of Alias('get_active_users', 'jwtlib.repository.UserRepository.get_active_users')>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",
@@ -1331,7 +1331,7 @@
"kind": "function",
"path": "jwtlib.utils.get_current_user",
"signature": "<bound method Function.signature of Function('get_current_user', 38, 73)>",
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository, optional):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository | None):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
},
"get_validated_token_payload": {
"name": "get_validated_token_payload",

View File

@@ -136,7 +136,7 @@
"kind": "function",
"path": "jwtlib.repository.create_access_token",
"signature": "<bound method Alias.signature of Alias('create_access_token', 'jwtlib.security.create_access_token')>",
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta, optional):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta | None):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
},
"hash_password": {
"name": "hash_password",
@@ -171,21 +171,21 @@
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_by_username",
"signature": "<bound method Function.signature of Function('get_by_username', 54, 67)>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_by_email",
"signature": "<bound method Function.signature of Function('get_by_email', 69, 82)>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.repository.UserRepository.get_active_users",
"signature": "<bound method Function.signature of Function('get_active_users', 84, 98)>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",

View File

@@ -116,7 +116,7 @@
"kind": "function",
"path": "jwtlib.security.create_access_token",
"signature": "<bound method Function.signature of Function('create_access_token', 64, 86)>",
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta, optional):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
"docstring": "Generate a new `JWT` access token.\n\nArgs:\n data (dict):\n Subject data to include in the token payload.\n expires_delta (timedelta | None):\n Optional expiration override.\n\nReturns:\n str:\n An encoded `JWT` string."
},
"get_jwt_payload": {
"name": "get_jwt_payload",

View File

@@ -104,21 +104,21 @@
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_by_username",
"signature": "<bound method Alias.signature of Alias('get_by_username', 'jwtlib.repository.UserRepository.get_by_username')>",
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique username.\n\nArgs:\n username (str):\n The username to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_by_email": {
"name": "get_by_email",
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_by_email",
"signature": "<bound method Alias.signature of Alias('get_by_email', 'jwtlib.repository.UserRepository.get_by_email')>",
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n Optional[User]:\n The User document if found, otherwise None."
"docstring": "Retrieve a user by their unique email address.\n\nArgs:\n email (str):\n The email address to search for.\n\nReturns:\n User | None:\n The User document if found, otherwise None."
},
"get_active_users": {
"name": "get_active_users",
"kind": "function",
"path": "jwtlib.utils.UserRepository.get_active_users",
"signature": "<bound method Alias.signature of Alias('get_active_users', 'jwtlib.repository.UserRepository.get_active_users')>",
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n List[User]:\n A list of active User documents."
"docstring": "List all active users with pagination.\n\nArgs:\n skip (int):\n Number of records to skip.\n limit (int):\n Maximum number of records to return.\n\nReturns:\n list[User]:\n A list of active User documents."
},
"authenticate_user": {
"name": "authenticate_user",
@@ -148,7 +148,7 @@
"kind": "function",
"path": "jwtlib.utils.get_current_user",
"signature": "<bound method Function.signature of Function('get_current_user', 38, 73)>",
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository, optional):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
"docstring": "Validate token and return authenticated public user.\n\nArgs:\n token (str):\n The `JWT` string to validate.\n repo (UserRepository | None):\n The user repository to use for resolution.\n\nReturns:\n PublicUser:\n The resolved and validated user object.\n\nRaises:\n InvalidToken:\n If the token is missing, malformed, or invalid.\n UserNotFound:\n If the token is valid, but the user does not exist in the\n repository."
},
"get_validated_token_payload": {
"name": "get_validated_token_payload",