Skip to main content
Glama
factory.py913 B
from app.auth_client.admin_introspect import AdminIntrospectAuthVerifier from app.auth_client.interface import AuthVerifier from app.auth_client.jwt_verify import LocalJWTAuthVerifier from app.core.config import Settings # 鉴权实现的注册中心 def build_auth_verifier(settings: Settings) -> AuthVerifier: if settings.auth_mode == "local_jwt": # LocalJWTAuthVerifier 不需要显式继承 AuthVerifier # 但它必须“结构上”提供 verify,否则就违背了这个模块的设计契约 return LocalJWTAuthVerifier(secret_key=settings.secret_key) if settings.auth_mode == "admin_introspect": return AdminIntrospectAuthVerifier( base_url=settings.admin_base_url, me_path=settings.admin_me_path, timeout_seconds=settings.admin_timeout_seconds, ) raise ValueError(f"unsupported auth_mode: {settings.auth_mode}")

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/Jayleonc/weather-mcp'

If you have feedback or need assistance with the MCP directory API, please join our Discord server