File tree Expand file tree Collapse file tree 1 file changed +21
-2
lines changed
tests/client/auth/extensions Expand file tree Collapse file tree 1 file changed +21
-2
lines changed Original file line number Diff line number Diff line change 22
33import jwt
44import pytest
5- from client .test_auth import MockTokenStorage
65
76from mcp .client .auth .extensions .client_credentials import JWTParameters , RFC7523OAuthClientProvider
8- from mcp .shared .auth import OAuthClientInformationFull , OAuthClientMetadata
7+ from mcp .shared .auth import OAuthClientInformationFull , OAuthClientMetadata , OAuthToken
8+
9+
10+ class MockTokenStorage :
11+ """Mock token storage for testing."""
12+
13+ def __init__ (self ):
14+ self ._tokens : OAuthToken | None = None
15+ self ._client_info : OAuthClientInformationFull | None = None
16+
17+ async def get_tokens (self ) -> OAuthToken | None :
18+ return self ._tokens
19+
20+ async def set_tokens (self , tokens : OAuthToken ) -> None :
21+ self ._tokens = tokens
22+
23+ async def get_client_info (self ) -> OAuthClientInformationFull | None :
24+ return self ._client_info
25+
26+ async def set_client_info (self , client_info : OAuthClientInformationFull ) -> None :
27+ self ._client_info = client_info
928
1029
1130@pytest .fixture
You can’t perform that action at this time.
0 commit comments