mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-20 20:44: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> |
||
|---|---|---|
| .. | ||
| oauth_proxy | ||
| providers | ||
| __init__.py | ||
| test_auth_provider.py | ||
| test_authorization.py | ||
| test_cimd.py | ||
| test_cimd_validators.py | ||
| test_debug_verifier.py | ||
| test_enhanced_error_responses.py | ||
| test_jwt_issuer.py | ||
| test_jwt_provider.py | ||
| test_jwt_provider_bearer.py | ||
| test_multi_auth.py | ||
| test_oauth_consent_flow.py | ||
| test_oauth_consent_page.py | ||
| test_oauth_mounting.py | ||
| test_oauth_proxy_redirect_validation.py | ||
| test_oauth_proxy_storage.py | ||
| test_oidc_proxy.py | ||
| test_oidc_proxy_token.py | ||
| test_redirect_validation.py | ||
| test_remote_auth_provider.py | ||
| test_ssrf_protection.py | ||
| test_static_token_verifier.py | ||