mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-23 05:54:19 +02:00
Fix typing
This commit is contained in:
parent
78f0196db5
commit
33263582b8
2 changed files with 16 additions and 1 deletions
|
|
@ -80,7 +80,7 @@ class OAuthClientProvider(_MCPOAuthClientProvider):
|
|||
ServerOAuthMetadata instead of the restrictive MCP OAuthMetadata.
|
||||
"""
|
||||
# Extract base URL per MCP spec
|
||||
auth_base_url = self._get_authorization_base_url(server_url)
|
||||
auth_base_url = self.context.get_authorization_base_url(server_url)
|
||||
url = urljoin(auth_base_url, "/.well-known/oauth-authorization-server")
|
||||
|
||||
from mcp.types import LATEST_PROTOCOL_VERSION
|
||||
|
|
|
|||
|
|
@ -43,3 +43,18 @@ class OAuthProvider(
|
|||
self.client_registration_options = client_registration_options
|
||||
self.revocation_options = revocation_options
|
||||
self.required_scopes = required_scopes
|
||||
|
||||
async def verify_token(self, token: str) -> AccessToken | None:
|
||||
"""
|
||||
Verify a bearer token and return access info if valid.
|
||||
|
||||
This method implements the TokenVerifier protocol by delegating
|
||||
to our existing load_access_token method.
|
||||
|
||||
Args:
|
||||
token: The token string to validate
|
||||
|
||||
Returns:
|
||||
AccessToken object if valid, None if invalid or expired
|
||||
"""
|
||||
return await self.load_access_token(token)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue