mirror of
https://github.com/PrefectHQ/fastmcp.git
synced 2026-08-24 06:24:18 +02:00
* Add subject field to AccessToken initialization Fixes #4266 Add `subject` property to the AccessToken. ```python return AccessToken( token=access_token_as_dict["token"], client_id=access_token_as_dict["client_id"], scopes=access_token_as_dict["scopes"], subject=access_token_as_dict["subject"], # Optional fields expires_at=access_token_as_dict.get("expires_at"), resource=access_token_as_dict.get("resource"), claims=access_token_as_dict.get("claims") or {}, ) ``` * Populate AccessToken.subject across all token verifiers Closes #4266. get_access_token().subject was always None: the SDK's AccessToken.subject wasn't carried into FastMCP's AccessToken by the dependency-layer conversion, and none of the built-in TokenVerifiers (JWT, introspection, and the OAuth-provider verifiers for Discord, Clerk, Google, WorkOS, HuggingFace, GitHub, and Cognito) populated it from the sub claim/field they already extract. --------- Co-authored-by: Jeremiah Lowin <153965+jlowin@users.noreply.github.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 | ||