[v1.x] Add AuthSettings.validate_token_resource to check a bearer token's resource (#3451)
Some checks failed
Main branch checks / checks (push) Has been cancelled

This commit is contained in:
Max 2026-09-05 03:52:13 +01:00 • committed by GitHub
commit 8c2fa6eaba
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -26,8 +26,9 @@ mcp = FastMCP(
# Auth settings for RFC 9728 Protected Resource Metadata
auth=AuthSettings(
issuer_url=AnyHttpUrl("https://auth.example.com"), # Authorization Server URL
resource_server_url=AnyHttpUrl("http://localhost:3001"), # This server's URL
resource_server_url=AnyHttpUrl("http://127.0.0.1:8000/mcp"), # This server's URL (mcp.run() default)
required_scopes=["user"],
validate_token_resource=True,
),
)