LangChain Reference home pageLangChain ReferenceLangChain Reference
  • GitHub
  • Main Docs
Deep Agents
LangChain
LangGraph
Integrations
LangSmith
  • Overview
  • LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    ⌘I

    LangChain Assistant

    Ask a question to get started

    Enter to send•Shift+Enter new line

    Menu

    LangGraph Checkpoint
    LangGraph Store
    Checkpoint Postgres
    Store Postgres
    Checkpoint SQLite
    LangGraph Prebuilt
    LangGraph CLI
    LangGraph SDK
    LangGraph Supervisor
    LangGraph Swarm
    Language
    Theme
    Pythonlanggraph-clischemasSecurityConfig
    Class●Since v0.4

    SecurityConfig

    Copy
    SecurityConfig()

    Bases

    TypedDict

    Constructors

    Attributes

    View source on GitHub
    constructor
    __init__
    NameType
    securitySchemesdict[str, dict[str, Any]]
    securitylist[dict[str, list[str]]]
    pathsdict[str, dict[str, list[dict[str, list[str]]]]]
    attribute
    securitySchemes: dict[str, dict[str, Any]]

    Describe each security scheme recognized by your OpenAPI spec.

    Keys are scheme names (e.g. "OAuth2", "ApiKeyAuth") and values are their definitions. Example: { "OAuth2": { "type": "oauth2", "flows": { "password": { "tokenUrl": "/token", "scopes": {"read": "Read data", "write": "Write data"} } } } }

    attribute
    security: list[dict[str, list[str]]]

    Global security requirements across all endpoints.

    Each element in the list maps a security scheme (e.g. "OAuth2") to a list of scopes (e.g. ["read", "write"]). Example: [ {"OAuth2": ["read", "write"]}, {"ApiKeyAuth": []} ]

    attribute
    paths: dict[str, dict[str, list[dict[str, list[str]]]]]

    Path-specific security overrides.

    Keys are path templates (e.g., "/items/{item_id}"), mapping to:

    • Keys that are HTTP methods (e.g., "GET", "POST"),
    • Values are lists of security definitions (just like security) for that method.

    Configuration for OpenAPI security definitions and requirements.

    Useful for specifying global or path-level authentication and authorization flows (e.g., OAuth2, API key headers, etc.).