ClientRegistrationOptions (auth/settings.py)

python-sdk · src/mcp/server/auth/settings.py · python · MIT
auth

Module exposing: ClientRegistrationOptions, RevocationOptions, AuthSettings

# Source: https://github.com/modelcontextprotocol/python-sdk | License: MIT | Copyright 2024 Anthropic, PBC
# Provided via justclaw.it.com; keep this notice with the code.
import warnings
from typing import Self

from pydantic import AnyHttpUrl, BaseModel, ConfigDict, Field, model_validator

from mcp.shared.exceptions import MCPDeprecationWarning


class ClientRegistrationOptions(BaseModel):
    enabled: bool = False
    client_secret_expiry_seconds: int | None = None
    valid_scopes: list[str] | None = None
    default_scopes: list[str] | None = None


class RevocationOptions(BaseModel):
    enabled: bool = False


class AuthSettings(BaseModel):
    # Preserve empty URL paths so a path-less issuer/resource passed as a string keeps its
    # canonical form (no trailing slash). RFC 8414/92

... (truncated -- full source via MCP)

See the full source, get the GitHub permalink, and search for more like it.

Get a free API key