Files
docs/mcp/py-jwt/modules/jwtlib.security.json
Vishesh 'ironeagle' Bangotra 0c25cbb19f feat: unify docs portal and MCP servers into one config-driven service
- add config.yml as single source of truth for collected repos/categories
- add collect.py CLI to pull lib/api/wiki site builds and mcp bundles from
  source repos and regenerate nginx.conf + _index/index.html
- port mcp runtime (main.py/core.py/config.py): nginx + health + FastMCP
  servers started from config.yml
- docker: python:3.13-slim + nginx, expose 8000-8006 + 9000 (html portal)
- drone: publish html (6007:9000) and MCP ports 8000-8006
- move mongo-ops docs to wiki/, add auth-server (api) and hexa (lib)
- refresh lib site builds (lib/ prefix) and collect mcp bundles
2026-09-11 15:14:51 +05:30

130 lines
6.2 KiB
JSON

{
"module": "jwtlib.security",
"content": {
"path": "jwtlib.security",
"docstring": "# Summary\n\nSecurity utilities: Password hashing and `JWT` management.\n\nThis module provides low-level cryptographic helpers for password\nhashing and `JWT` token lifecycle management. It serves as the\ncryptographic engine for the authentication library.",
"objects": {
"os": {
"name": "os",
"kind": "alias",
"path": "jwtlib.security.os",
"signature": "<bound method Alias.signature of Alias('os', 'os')>",
"docstring": null
},
"datetime": {
"name": "datetime",
"kind": "alias",
"path": "jwtlib.security.datetime",
"signature": "<bound method Alias.signature of Alias('datetime', 'datetime.datetime')>",
"docstring": null
},
"timedelta": {
"name": "timedelta",
"kind": "alias",
"path": "jwtlib.security.timedelta",
"signature": "<bound method Alias.signature of Alias('timedelta', 'datetime.timedelta')>",
"docstring": null
},
"JWTError": {
"name": "JWTError",
"kind": "alias",
"path": "jwtlib.security.JWTError",
"signature": "<bound method Alias.signature of Alias('JWTError', 'jose.JWTError')>",
"docstring": null
},
"jwt": {
"name": "jwt",
"kind": "alias",
"path": "jwtlib.security.jwt",
"signature": "<bound method Alias.signature of Alias('jwt', 'jose.jwt')>",
"docstring": null
},
"CryptContext": {
"name": "CryptContext",
"kind": "alias",
"path": "jwtlib.security.CryptContext",
"signature": "<bound method Alias.signature of Alias('CryptContext', 'passlib.context.CryptContext')>",
"docstring": null
},
"TokenPayload": {
"name": "TokenPayload",
"kind": "class",
"path": "jwtlib.security.TokenPayload",
"signature": "<bound method Alias.signature of Alias('TokenPayload', 'jwtlib.models.TokenPayload')>",
"docstring": "Decoded `JWT` payload.\n\nAttributes:\n sub (str):\n Subject claim identifying the user (typically a username or user ID).\n exp (int):\n Expiration time as a Unix timestamp (seconds since epoch).\n\nNotes:\n **Responsibilities:**\n\n - Represents the validated claims extracted from a `JWT` after\n signature verification. This model is used internally to enforce\n required claims and provide a typed interface to token data.\n\n **Guarantees:**\n\n - This model assumes the `JWT` signature has already been verified.\n No authorization decisions should be made solely on this model.\n Additional claims may exist but are intentionally ignored.",
"members": {
"sub": {
"name": "sub",
"kind": "attribute",
"path": "jwtlib.security.TokenPayload.sub",
"signature": "<bound method Alias.signature of Alias('sub', 'jwtlib.models.security.TokenPayload.sub')>",
"docstring": null
},
"exp": {
"name": "exp",
"kind": "attribute",
"path": "jwtlib.security.TokenPayload.exp",
"signature": "<bound method Alias.signature of Alias('exp', 'jwtlib.models.security.TokenPayload.exp')>",
"docstring": null
}
}
},
"SECRET_KEY": {
"name": "SECRET_KEY",
"kind": "attribute",
"path": "jwtlib.security.SECRET_KEY",
"signature": null,
"docstring": null
},
"ALGORITHM": {
"name": "ALGORITHM",
"kind": "attribute",
"path": "jwtlib.security.ALGORITHM",
"signature": null,
"docstring": null
},
"ACCESS_TOKEN_EXPIRE_MINUTES": {
"name": "ACCESS_TOKEN_EXPIRE_MINUTES",
"kind": "attribute",
"path": "jwtlib.security.ACCESS_TOKEN_EXPIRE_MINUTES",
"signature": null,
"docstring": null
},
"pwd_context": {
"name": "pwd_context",
"kind": "attribute",
"path": "jwtlib.security.pwd_context",
"signature": null,
"docstring": null
},
"hash_password": {
"name": "hash_password",
"kind": "function",
"path": "jwtlib.security.hash_password",
"signature": "<bound method Function.signature of Function('hash_password', 29, 41)>",
"docstring": "Hash a plain-text password using the configured crypt context.\n\nArgs:\n password (str):\n The plain-text password to hash.\n\nReturns:\n str:\n The secure hash string."
},
"verify_password": {
"name": "verify_password",
"kind": "function",
"path": "jwtlib.security.verify_password",
"signature": "<bound method Function.signature of Function('verify_password', 44, 58)>",
"docstring": "Verify a plain-text password against a stored hash.\n\nArgs:\n plain_password (str):\n The unhashed password provided by the user.\n hashed_password (str):\n The secure hash to verify against.\n\nReturns:\n bool:\n True if the password is valid, False otherwise."
},
"create_access_token": {
"name": "create_access_token",
"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."
},
"get_jwt_payload": {
"name": "get_jwt_payload",
"kind": "function",
"path": "jwtlib.security.get_jwt_payload",
"signature": "<bound method Function.signature of Function('get_jwt_payload', 89, 109)>",
"docstring": "Decode and validate a `JWT`, returning a strongly-typed payload.\n\nArgs:\n token (str):\n The `JWT` string to decode.\n\nReturns:\n TokenPayload:\n The decoded and typed token payload.\n\nRaises:\n JWTError:\n If the token is invalid, expired, or malformed."
}
}
}
}