The current test_auth.py verifies that configure_auth() returns a JWTVerifier when env vars are set, but doesn't test actual token verification through the FastMCP auth pipeline.
Acceptance criteria:
- Test that a tool with
auth=require_scopes("admin") rejects unauthenticated requests
- Test that a valid JWT with the correct scope is accepted
- Test that a valid JWT with wrong scopes is rejected
Context: identified in FastMCP 3.x migration retro.
The current
test_auth.pyverifies thatconfigure_auth()returns a JWTVerifier when env vars are set, but doesn't test actual token verification through the FastMCP auth pipeline.Acceptance criteria:
auth=require_scopes("admin")rejects unauthenticated requestsContext: identified in FastMCP 3.x migration retro.