fastmcp.server.auth.providers.debug
Debug token verifier for testing and special cases.
This module provides a flexible token verifier that delegates validation
to a custom callable. Useful for testing, development, or scenarios where
standard verification isn’t possible (like opaque tokens without introspection).
Example:
Classes
DebugTokenVerifier
Token verifier with custom validation logic.
This verifier delegates token validation to a user-provided callable.
By default, it accepts all non-empty tokens (useful for testing).
Use cases:
- Testing: Accept any token without real verification
- Development: Custom validation logic for prototyping
- Opaque tokens: When you have tokens with no introspection endpoint
verify_token
token: The token string to validate
- AccessToken if validation succeeds, None otherwise

