File tree Expand file tree Collapse file tree 4 files changed +9
-12
lines changed
tests/server/fastmcp/auth Expand file tree Collapse file tree 4 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1010from starlette .requests import HTTPConnection
1111from starlette .types import Scope
1212
13- from mcp .server .auth .provider import OAuthServerProvider
14- from mcp .server .auth .types import AuthInfo
13+ from mcp .server .auth .provider import AuthInfo , OAuthServerProvider
1514
1615
1716class AuthenticatedUser (SimpleUser ):
Original file line number Diff line number Diff line change 33
44from pydantic import AnyHttpUrl , BaseModel
55
6- from mcp .server .auth .types import AuthInfo
76from mcp .shared .auth import (
87 OAuthClientInformationFull ,
98 OAuthToken ,
@@ -33,6 +32,13 @@ class RefreshToken(BaseModel):
3332 expires_at : int | None = None
3433
3534
35+ class AuthInfo (BaseModel ):
36+ token : str
37+ client_id : str
38+ scopes : list [str ]
39+ expires_at : int | None = None
40+
41+
3642class OAuthRegisteredClientsStore (Protocol ):
3743 async def get_client (self , client_id : str ) -> OAuthClientInformationFull | None :
3844 """
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 2020from starlette .routing import Mount
2121
2222from mcp .server .auth .provider import (
23+ AuthInfo ,
2324 AuthorizationCode ,
2425 AuthorizationParams ,
2526 OAuthRegisteredClientsStore ,
3233 RevocationOptions ,
3334 create_auth_router ,
3435)
35- from mcp .server .auth .types import AuthInfo
3636from mcp .server .fastmcp import FastMCP
3737from mcp .shared .auth import (
3838 OAuthClientInformationFull ,
You can’t perform that action at this time.
0 commit comments