mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-21 21:14:17 +02:00
* Transparently refresh upstream token in OAuthProxy.load_access_token() When upstream token validation fails during load_access_token, attempt to refresh using the stored refresh token before returning None. This prevents premature 401s that force clients into expensive full re-auth flows when the upstream token expires. Co-authored-by: Claude <noreply@anthropic.com> * Gate transparent refresh on token expiry, add advisory lock Only attempt upstream refresh when the token is actually expired, not on any validation failure (scope mismatch, revocation, etc.). Add per-token advisory lock to prevent concurrent async tasks from racing to refresh the same upstream token. * Re-check expiry inside lock, reload from storage after refresh failure --------- Co-authored-by: Claude <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| conftest.py | ||
| test_authorization.py | ||
| test_client_registration.py | ||
| test_config.py | ||
| test_e2e.py | ||
| test_oauth_proxy.py | ||
| test_tokens.py | ||
| test_ui.py | ||