fix: subclass AccessToken with custom fields
This commit is contained in:
@@ -89,12 +89,10 @@ class ExternalOAuthProvider(GoogleProvider):
|
||||
f"Validated external access token for: {user_info['email']}"
|
||||
)
|
||||
|
||||
# Create a mock AccessToken that the middleware expects
|
||||
# This matches the structure that FastMCP's AccessToken would have
|
||||
from types import SimpleNamespace
|
||||
|
||||
scope_list = list(getattr(self, "required_scopes", []) or [])
|
||||
access_token = SimpleNamespace(
|
||||
from auth.oauth_types import WorkspaceAccessToken
|
||||
|
||||
access_token = WorkspaceAccessToken(
|
||||
token=token,
|
||||
scopes=scope_list,
|
||||
expires_at=int(time.time())
|
||||
|
||||
Reference in New Issue
Block a user