File tree Expand file tree Collapse file tree 2 files changed +17
-3
lines changed
examples/servers/simple-auth/mcp_simple_auth
tests/server/fastmcp/auth Expand file tree Collapse file tree 2 files changed +17
-3
lines changed Original file line number Diff line number Diff line change @@ -247,6 +247,20 @@ async def exchange_refresh_token(
247
247
"""Exchange refresh token"""
248
248
raise NotImplementedError ("Not supported" )
249
249
250
+ async def exchange_token (
251
+ self ,
252
+ client : OAuthClientInformationFull ,
253
+ subject_token : str ,
254
+ subject_token_type : str ,
255
+ actor_token : str | None ,
256
+ actor_token_type : str | None ,
257
+ scope : list [str ] | None ,
258
+ audience : str | None ,
259
+ resource : str | None ,
260
+ ) -> OAuthToken :
261
+ """Exchange an external token for an MCP access token."""
262
+ raise NotImplementedError ("Token exchange is not supported" )
263
+
250
264
async def exchange_client_credentials (
251
265
self , client : OAuthClientInformationFull , scopes : list [str ]
252
266
) -> OAuthToken :
@@ -260,7 +274,7 @@ async def exchange_client_credentials(
260
274
)
261
275
return OAuthToken (
262
276
access_token = token ,
263
- token_type = "bearer " ,
277
+ token_type = "Bearer " ,
264
278
expires_in = 3600 ,
265
279
scope = " " .join (scopes ),
266
280
)
Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ async def exchange_client_credentials(
179
179
)
180
180
return OAuthToken (
181
181
access_token = access_token ,
182
- token_type = "bearer " ,
182
+ token_type = "Bearer " ,
183
183
expires_in = 3600 ,
184
184
scope = " " .join (scopes ),
185
185
)
@@ -207,7 +207,7 @@ async def exchange_token(
207
207
)
208
208
return OAuthToken (
209
209
access_token = access_token ,
210
- token_type = "bearer " ,
210
+ token_type = "Bearer " ,
211
211
expires_in = 3600 ,
212
212
scope = " " .join (scope or ["read" ]),
213
213
)
You can’t perform that action at this time.
0 commit comments